[R] Retrieving data from survey in R Studio

Barathan Roy Pinas bpin3104 at uni.sydney.edu.au
Thu Aug 18 11:19:05 CEST 2016


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]]



More information about the R-help mailing list