[R] data frame output almost
Randy Zelick
zelickr at pdx.edu
Sat Mar 20 04:58:53 CET 2004
Hello again,
I got three responses for help on the leading zero problem. Thank you.
Alas I still don't have it working. Here are more specifics:
I read in a data file like this:
participants<-read.table("C:/Work/blah-blah")
The data file consists of the fields last name, first name, social
security number, response score 1, response score 2 and so forth.
If in the console window I type "participants" I get something like:
Jones Norman 786123344 98.2 16.3
Flintstone Fred 111457654 10.1 8.8
Ugly Butt 89733456 66.7 32.0
The problem is that the 3rd social security number is really "089733456"
and it needs to look like that.
None of the methods suggested seemed to work. I could make the social
security object alone print with leading zeros, but not as part of the
data frame.
Thanks again,
=Randy=
R. Zelick email: zelickr at pdx.edu
Department of Biology voice: 503-725-3086
Portland State University fax: 503-725-3888
mailing:
P.O. Box 751
Portland, OR 97207
shipping:
1719 SW 10th Ave, Room 246
Portland, OR 97201
More information about the R-help
mailing list