Re: [R] Retrieving data from survey in R Studio

2016-08-18 Thread John Dougherty
On Thu, 18 Aug 2016 09:19:05 + Barathan Roy Pinas wrote: > Hello, > > > I have been given a .csv file and it is not loading. This is what I > did. > > > survey=read.csv("http://www.maths.usyd.edu.au/u/UG/IM/STAT2012/r/survey.csv";) > attach(survey) > pulse.sf=pulse[smoke==1 & sex==2] > pu

Re: [R] Retrieving data from survey in R Studio

2016-08-18 Thread Bob Rudis
Ulrik: you can absolutely read from a URL in read.csv() with that syntax. The error `## Error in attach(survey): object 'survey' not found` suggests that the OP mis-typed something in the `survey` name in the assignment from `read.csv()`. However, the OP has quite a bit more to be concerned about

Re: [R] Retrieving data from survey in R Studio

2016-08-18 Thread Ulrik Stervbo
Thanks for clarifying Bob Rudis schrieb am Do., 18. Aug. 2016 19:41: > Ulrik: you can absolutely read from a URL in read.csv() with that syntax. > > The error `## Error in attach(survey): object 'survey' not found` > suggests that the OP mis-typed something in the `survey` name in the > assignme

Re: [R] Retrieving data from survey in R Studio

2016-08-18 Thread Clint Bowman
After: survey <- read.csv(file="http://www.maths.usyd.edu.au/u/UG/IM/STAT2012/r/survey.csv";) do: summary(survey) then bone up on "attach" and "with". Clint BowmanINTERNET: cl...@ecy.wa.gov Air Quality Modeler INTERNET: cl...@math.utah.edu Departm

Re: [R] Retrieving data from survey in R Studio

2016-08-18 Thread Ulrik Stervbo
I don't think you can read files into R like that. This answer http://stackoverflow.com/questions/3236651/read-data-from-internet on Stack Overflow tells you, you could use the RCurl package. Here are more examples on getting data from online sources https://www.r-bloggers.com/getting-data-from-an

Re: [R] Retrieving data from survey in R Studio

2016-08-18 Thread Duncan Murdoch
Sorry, we don't do homework on this list. You should ask your instructor. Duncan Murdoch On 18/08/2016 5:19 AM, Barathan Roy Pinas wrote: Hello, I have been given a .csv file and it is not loading. This is what I did. survey=read.csv("http://www.maths.usyd.edu.au/u/UG/IM/STAT2012/r/survey.

[R] Retrieving data from survey in R Studio

2016-08-18 Thread Barathan Roy Pinas
Hello, I have been given a .csv file and it is not loading. This is what I did. survey=read.csv("http://www.maths.usyd.edu.au/u/UG/IM/STAT2012/r/survey.csv";) attach(survey) pulse.sf=pulse[smoke==1 & sex==2] pulse.sf Template link here.