An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090407/024c73ee/attachment-0001.pl>
write text file as output without quotes
4 messages · Ravi S. Shankar, Sarah Goslee, Thomas Liebig +1 more
But did you try the help for write.table() ???
write.table(x, file = "", append = FALSE, quote = TRUE, sep = " ",
eol = "\n", na = "NA", dec = ".", row.names = TRUE,
col.names = TRUE, qmethod = c("escape", "double"))
Set quote=FALSE.
Sarah
On Tue, Apr 7, 2009 at 9:13 AM, Ravi S. Shankar <ravis at ambaresearch.com> wrote:
Hi R,
When I use the below to write the text file
try=data.frame(rep("a",5), rep("b",5))
write.table(try,"z:\\try.txt",row.names=F,col.names=F,sep="\t")
the output contains two columns with quotes! Is there a way to write
without quotes?
I tried
try[,1]=noquote(try[,1])
try[,2]=noquote(try[,2])
Sarah Goslee http://www.functionaldiversity.org
Hi,
you shouldn't call your variable try, see ?try for help on this function.
write.table has a paramter called quotes. just set this to FALSE to
produce your wanted output:
t=data.frame(rep("a",5), rep("b",5))
write.table(t,"z:\\try.txt",row.names=F,col.names=F,sep="\t", quotes=FALSE)
regards,
Thomas Liebig
Ravi S. Shankar schrieb:
Hi R,
When I use the below to write the text file
try=data.frame(rep("a",5), rep("b",5))
write.table(try,"z:\\try.txt",row.names=F,col.names=F,sep="\t")
the output contains two columns with quotes! Is there a way to write
without quotes?
I tried
try[,1]=noquote(try[,1])
try[,2]=noquote(try[,2])
Thank you,
Regards,
Ravi Shankar
Thomas Liebig Fraunhofer-Institut f?r Intelligente Analyse- und Informationssysteme (IAIS) Schloss Birlinghoven, D-53754 Sankt Augustin, Germany Email: thomas.liebig at iais.fraunhofer.de Phone: +49 2241 142050 Fax: +49 2241 142072
?write.table write.table(..., quote=FALSE)
On Tue, Apr 7, 2009 at 9:13 AM, Ravi S. Shankar <ravis at ambaresearch.com> wrote:
Hi R,
When I use the below to write the text file
try=data.frame(rep("a",5), rep("b",5))
write.table(try,"z:\\try.txt",row.names=F,col.names=F,sep="\t")
the output contains two columns with quotes! Is there a way to write
without quotes?
I tried
try[,1]=noquote(try[,1])
try[,2]=noquote(try[,2])
Thank you,
Regards,
Ravi Shankar
This e-mail may contain confidential and/or privileged i...{{dropped:13}}
______________________________________________ R-help at 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.
Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?