[r/en] Fix read.csv per #2236

This commit is contained in:
Keith Miyake 2017-10-19 23:14:24 -07:00
parent 4d3637bfc4
commit b3cb49f69f

View File

@ -663,7 +663,8 @@ require(plyr)
# "pets.csv" is a file on the internet
# (but it could just as easily be a file on your own computer)
pets <- read.csv("http://learnxinyminutes.com/docs/pets.csv")
require(RCurl)
pets <- read.csv(textConnection(getURL("http://learnxinyminutes.com/docs/pets.csv")))
pets
head(pets, 2) # first two rows
tail(pets, 1) # last row