Re: [R] Re ading multiple Excel 2007 files with a loop

2009-11-18 Thread Mark W. Miller
Thank you for all of the responses. They were all very helpful. The best response came from a gentleman at Berkeley who suggested I change the channel statement to that used below: Mark Miller Gainesville, Florida library(RODBC) setwd("U:/test folder") fname <- list.files(pattern=".\\.x

[R] Re ading multiple Excel 2007 files with a loop

2009-11-18 Thread Mark W. Miller
I have several hundred Excel 2007 data files in a folder. I would like to read every file in a single given folder using a loop. I have searched the FAQ, the forum archives here, other or older R boards and the R Import / Export documentation, and have asked some very knowledgeable R users with

[R] splitting scientific names into genus, species, and subspecies

2009-11-04 Thread Mark W. Miller
I have a list of scientific names in a data set. I would like to split the names into genus, species and subspecies. Not all names include a subspecies. Could someone show me how to do this? My example code is: a <- matrix(c('genusA speciesA', 10, 'genusB speciesAA', 20,

Re: [R] re placing in character column

2009-10-28 Thread Mark W. Miller
I am guessing that your is not really an NA_character, but rather a factor with a level of "". See if str(s1) confirms my suspicions. > df1 <- read.table(textConnection(" Firstname Lastname Age + 1Bob Smith 20 + 2 John Clark NA + 3 Andy 40"), header=T)