search for: global2001

Displaying 1 result from an estimated 1 matches for "global2001".

2013 Jan 02
2
Read many cvs files
...mate this code for many files of the same type. But I don´t know how to make it. In particular, i don´t know how to read many files each one as an r object with the name of the file. Then a for loop would be sufficient, right? Many thanks and a happy new year. Dominic datos <- read.table('global2001.csv',head=T,sep=';',stringsAsFactors=F) datos[datos==""] <- NA temp <- datos[,19:53] y <- split(temp,1:nrow(temp)) y2 <- lapply(y,function(x) paste(x[!is.na(x)],collapse=";")) global2001 <- datos[,-19:-53] global2001[1,"CODPA"] <- 1...