[R] Retrieving data from survey in R Studio

Duncan Murdoch murdoch.duncan at gmail.com
Thu Aug 18 19:23:00 CEST 2016


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.csv")
> attach(survey)
> pulse.sf=pulse[smoke==1 & sex==2]
> pulse.sf
>
> Template link here<http://www.maths.usyd.edu.au/u/UG/IM/STAT2012/r/p4.Rnw>.
>
> I insert the file into the R commands section for question 1. Doing that produces the following below:
>
>
> survey <- read.csv(file="http://www.maths.usyd.edu.au/u/UG/IM/STAT2012/r/survey.csv")
> attach(survey)
>
> ## Error in attach(survey): object 'survey' not found
> pulse.sf=pulse[smoke==1 & sex==2]
> ## Error in eval(expr, envir, enclos): object 'pulse' not found
> pulse.sf
> ## Error in eval(expr, envir, enclos): object 'pulse.sf' not
> found
>
> What's going on? I can actually download the survey and view it on Excel.
>
> Appreciate any help that I can get.
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list