mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-25 18:28:51 +00:00
Merge pull request #2926 from kaymmm/r-require-curl
[r/en] Fix read.csv per #2926
This commit is contained in:
commit
2e9cad560f
@ -663,7 +663,8 @@ require(plyr)
|
|||||||
|
|
||||||
# "pets.csv" is a file on the internet
|
# "pets.csv" is a file on the internet
|
||||||
# (but it could just as easily be a file on your own computer)
|
# (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
|
pets
|
||||||
head(pets, 2) # first two rows
|
head(pets, 2) # first two rows
|
||||||
tail(pets, 1) # last row
|
tail(pets, 1) # last row
|
||||||
|
Loading…
Reference in New Issue
Block a user