First PRoblem solved > read.csv("KT80.csv") X x 1 1 0.01331361 >
I ommitt "" in calling the file name... 2011/12/14 Trying To learn again <tryingtolearnag...@gmail.com> > Hi all, > > I have 100 csv files always with this information (I Attach two example > excels) > > KT80.csv contains: > ,"x" > 1,127.188271604938 > > KT80.csv contains > > ,"x" > 1,1.06329287351545 > > > I have three questions: > > First > > When I created this input files I used write.csv and it authomaticaly > creates the structure of the file as you can see. > > Second. If I try to read csv it appears: > > read.csv(KT2.csv,header=T, sep='.') > Error en read.table(file = file, header = header, sep = sep, quote = > quote, : > objeto 'KT2.csv' no encontrado > > But the file is in the right directy.... > > Third (supossing I can solve the format files) > > My main question is: > > I want to create a matrix (or data frame) for instance from file KT80.csv > to KT81.csv so that the rows are without header and position. > > > > 127.18 > 1.06 > > > Wich function would help me? > > I think I should use something like > > > > ffor (i in 80:81){ > > files <- paste('KT', i, '.csv', sep = '') > > myfun <- function(d) { > > da1 <- read.csv(d) > > Output[i,1]=da1[1,2] > > > > } > > lout<- lapply(files, myfun) > > } > > But results that says Output doesn´t exists? > > I must create before? How? > > Many Thans¡¡¡ > [[alternative HTML version deleted]]
______________________________________________ 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.