Hello there I ` m a newbie in R and have a question about the output of write.table My command looks like this: write.table(datatr$V1[data.chull],file="outr.txt", quote = FALSE, sep "\t") In the outputfile (outr.txt) I have an "x" in the left corner and a new row with numbers for each column(1,2,3...). I just want the values in my file. What should I change in write.table-command? output now: x 1 179.18143 2 169.73087 3 169.73087 4 140.48254 5 111.9501 6 59.180557 .... it should look like this: 179.18143 169.73087 169.73087 140.48254 111.9501 59.180557 ... thanks a lot for your help in advance! Nando _________________________________________________ Nando Foppa - Remote Sensing Research Group Department of Geography University of Bern Tel : +41 (0)31 631 8020 Hallerstr. 12 Fax : +49 (0)89 2443 43780 CH - 3012 Bern Mail: foppa at giub.unibe.ch Switzerland _________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hello there I ` m a newbie in R and have a question about the output of write.table My command looks like this: write.table(datatr$V1[data.chull],file="outr.txt", quote = FALSE, sep "\t") In the outputfile (outr.txt) I have an "x" in the left corner and a new row with numbers for each column(1,2,3...). I just want the values in my file. What should I change in write.table-command? output now: x 1 179.18143 2 169.73087 3 169.73087 4 140.48254 5 111.9501 6 59.180557 .... it should look like this: 179.18143 169.73087 169.73087 140.48254 111.9501 59.180557 ... thanks a lot for your help in advance! Nando _________________________________________________ Nando Foppa - Remote Sensing Research Group Department of Geography University of Bern Tel : +41 (0)31 631 8020 Hallerstr. 12 Fax : +49 (0)89 2443 43780 CH - 3012 Bern Mail: foppa at giub.unibe.ch Switzerland _________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 8 Jan 2002, Nando Foppa wrote:> Hello there > > I ` m a newbie in R and have a question about the output of write.table > My command looks like this: > write.table(datatr$V1[data.chull],file="outr.txt", quote = FALSE, sep > "\t") > > In the outputfile (outr.txt) I have an "x" in the left corner and a new > row with numbers for each column(1,2,3...). > I just want the values in my file. What should I change in > write.table-command?row.names = FALSE, col.names = FALSE. However, what you are writing is not a data frame but a vector, so I think write() is a more appropriate function. ... -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Nando Foppa wrote:> > Hello there > > I ` m a newbie in R and have a question about the output of write.table > My command looks like this: > write.table(datatr$V1[data.chull],file="outr.txt", quote = FALSE, sep > "\t") > > In the outputfile (outr.txt) I have an "x" in the left corner and a new > row with numbers for each column(1,2,3...). > I just want the values in my file. What should I change in > write.table-command?See ?write.table: write.table(..., row.names=FALSE, col.names=FALSE) Uwe> output now: > x > 1 179.18143 > 2 169.73087 > 3 169.73087 > 4 140.48254 > 5 111.9501 > 6 59.180557 > .... > > it should look like this: > 179.18143 > 169.73087 > 169.73087 > 140.48254 > 111.9501 > 59.180557 > ...-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._