On Mon, Jun 28, 2010 at 7:30 PM, <astar...@uci.edu> wrote: > Hi everybody, > > I'm working on the very > messy data, I have tried to clean it up in SAS and > SAS/IML but there is not enough info on how to handle certain things > in SAS so I have turned to R. The thing itself should be rather > simple, so i was wondering if someone could help me out. > > The original .csv has ([1] 7138 6338 ) dimensions with funds with the > corresponding dates and observations for each date for around 10 years and > 4000+ funds, meaning in COL5 has the next fund's name and so on. > > COL1 COL2 COL3 COL4 > HBNNF US Equity Date EQY_SH_OUT PX_VOLUME > #NAME? #N/A N/A 135000 > 7/7/2008 #N/A N/A 105000 > 7/17/2008 #N/A N/A 590000 > 7/22/2008 #N/A N/A 40000 > > > so in R this .csv is somehow read as list (using typeof) and not as > dataframe, and a lot of stuff like regexpr searches in the
The typeof of a data.frame is "list" so you do have a data frame -- not a list. Perhaps the problem is that you do not want factor columns but want character columns instead. Use read.csv(..., as.is = TRUE) ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.