[R] writing string values from a matrix to a file without enclosing quotes

Nevil Amos nevil.amos at gmail.com
Fri May 7 17:18:14 CEST 2010


I am trying to format data for the Geneland package
I need to write a series of paired numbers and paired "000"
to a plain ascii file without surrounding the numerals with quotes,
the original data is in a matrix formatted paired  strings,
and written to file using
write.table(x,"output filename",col.names=F,row.names=F)
thus
"77 79" "132 132" "000 000"
"179 181" "132 132" "150 150"
"179 179" "132 132" "000 000"
"179 179" "132 134" "150 152"

however I need the output file without the quotes but retaining 000 not 
reducing it to 0

thus
77 79 132 132 000 000
179 181 132 132 150 150
179 179 132 132 000 000
179 179 132 134 150 152

How might I achieve this?

Thanks

Nevil Amos



More information about the R-help mailing list