[R] getting started, reading listing and saving data

Murray Pung Murraypu at aimnsw.com.au
Wed Nov 23 03:03:17 CET 2005

Not sure about reading the first few lines, but summary(x) might be what you're after.

Try using the menu to save the workspace. File > Save Workspace. You can then load the workspace at the start of your next session and continue working.


-----Original Message-----
From: Ronnie Babigumira [mailto:r.babigumira at gmail.com]
Sent: Wednesday, 23 November 2005 12:38 PM
To: r-help at stat.math.ethz.ch
Subject: [R] getting started, reading listing and saving data

Dear List
I am new to R and to the list and will try best as I can be clear and
concise. My apologies if anything I write contravenes the posting code
on this list. I would also like to say I have run through most of the
material on the R website before writing this email however, I am

Here is what I want to do and what I have done

1. Read a comma seperated text file into R
I have used read.csv and it seems to have worked

2. List the a few observations to make sure the right stuff came in
I have failed to find a command that allows me to list a few
observations and would appreciate some help on this (I have used edit
which pops up an spreadsheet however, I would prefer a command that
allows me to list a few observations for inspection)

3. Save this data as an r dataset
I cant seem to figure this out (I tried  save(mytextfile, file =
"myrdata") but when I try to load what I saved, I get an error message
"Error: bad restore file magic number (file may be corrupted) -- no data loaded"

4. Load this r dataset and proceed to work on it

I would appreciate some help.

R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

More information about the R-help mailing list