[S] S: Importing Excel files

John Maindonald (john.maindonald@anu.edu.au)
Mon, 23 Nov 1998 17:11:19 +1100 (EST)


I am using Splus 4.5, release 2, under Windows 97.

On importing Excel files (File|Import Data|From File...) I find
that if the first row (after the header row) has an NA, then that
row will be taken as character, and read in as a factor.

In the above "Import Text as Factors" was left at "Auto", the
default. If under the option "Import Text as Factors" one
specifies "Never", then it seems that any column that is numeric
apart from such characters as a period, ?, NA5, 5NA, or is empty,
will (always or sometimes?) be read in as numeric, with the
offending characters set to NA and with no warning given.
Thus this "Never" setting is not a good way around the problem
noted above -- it is too dangerous.

I've found this facility for importing files highly useful.
I now wonder whether it is too unreliable to use with largish
files.

Is this facility reliable, apart from the problem just noted
with NAs in the first row, when one leaves "Import Text as
Factors" set to "Auto"?

I've been unable to find any way, with the Import Data facility,
to specify missing value codes. Is there one?

John Maindonald email : john.maindonald@anu.edu.au
Statistical Consulting Unit, phone : (6249)3998
c/o CMA, SMS, fax : (6249)5549
John Dedman Mathematical Sciences Building
Australian National University
Canberra ACT 0200
Australia
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news