> > now i ended up with only 10000. The 10000 is fine but when i export to > excel, it is missing the probeID. Here are my code and examples. > > library(xlsReadWrite) > ... > write.xls(cbind(data[1], > Variance=apply(data[,y],1,var)),file='c://variance.csv')
If you use write.xls you will get a binary xls-file and shouldn't use ' variance.csv' as filename (which make people expect a comma-delimited plain text file. If you want this you can use one of the functions write.table, write.csv or write.csv2. I was not able to run the code and don't know why ProbeID is missing. Personally I mostly calculate the data first and do output it afterwards, e.g. mydat <- cbind( data[1], Variance = apply( data[,y], 1, var ) ) write.xls( mydat, file = "c://variance.xls" ) Thus it is more clear if the problem is with the data or with the writing. If you provide me a small mydat dataset I could probably help better. Best, Hans-Peter [[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.