CommencerCommencer gratuitement

Let's be evil

This foolish R user is reading the iris data set and specified the header using the logical short-cut F.

Cet exercice fait partie du cours

Defensive R Programming

Afficher le cours

Instructions

  • Before the read.csv() code is run, redefine the variable F to be a positive numeric so that it is interpreted as TRUE .

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Define F to be interpreted as TRUE
F > ___

# Read in data: don't alter the line below
data_set <- read.csv("iris.csv", header = F)
Modifier et exécuter le code