R-intro.pdf - question on data used in an example.

1 view
Skip to first unread message

Matthew Bascom

unread,
Jul 3, 2009, 1:02:34 AM7/3/09
to Bay Area R Helpers

Hello Everyone,
 
Today I was going through the intro tutorial to get a better feel for the basic features of R.
 
On page 36 (35/100) the following line of code:
 

'HousePrice <- read.table("houses.data")'

results in the following error message:

'Error in file(file, "r") : cannot open the connection
In addition: Warning message:
In file(file, "r") :
  cannot open file 'houses.data': No such file or directory'

The help file is available in the help tab in the RGUI for Windows (v.2.8.1) under "Manuals (in PDF)." 

Is there a specific package that is required to access the data for this example?

Thank you for your time.

- Matt

 

Mark Knecht

unread,
Jul 3, 2009, 10:39:30 AM7/3/09
to Matthew Bascom, Bay Area R Helpers

Good question. I don't see it on my Win Vista or Linux systems. Looks
like it isn't shipped, but I suspect it never was and this is intended
as only a walk through and not so much a live example. Notice that in
the boxes they are showing you multiple forms that the data could be
in and then telling you what command you'd use with each.

You could, if you wanted to, copy the data in the box on that page and
paste it into a file named data.houses and then proceed forward but I
suspect that if you are interested in doing this for real that you
probably have some csv files or some other format that R can read.
Give it a try with your own data and if you have problems come back
and ask some questions. I started with R only a week ago. I'm not a
programmer and I'e managed in my first week to get the basis of a big
Excel spreadsheet all coded and working in R. It's not too hard once
you get going.

Good luck,
Mark

Reply all
Reply to author
Forward
0 new messages