Re: [R] Writing Vector to a File

From: Philipp Pagel <p.pagel_at_wzw.tum.de>
Date: Mon, 23 Jun 2008 15:32:14 +0200

On Mon, Jun 23, 2008 at 10:15:53PM +0900, Gundala Viswanath wrote:

> I've tried
>
> > write(as.character(myvec), "output.txt", sep="\n")
>
> and
>
> > writeLines(as.character(myvec), "output.txt", sep="\n")
>
> Both yielding same result.
>
> >> 1
> >> 1
> >> 1
> >> 1
> >> 1
> >> 6241
>
> Is there any other possible explanation, why it
> still went wrong?

Hm - weird. I guess it's time to find out where this piece of data came from and what exacty it contains. As Duncan suggested, show us the output of str(myvec) and maybe say a few words about the origin of the data (how was it read into R, how was it modified, ...).

BTW: what version of R are you running? And on what platform? Maybe it's a bug which has long been fixed and we simply can't reproduce it on the latest release?

cu

        Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany
http://mips.gsf.de/staff/pagel

______________________________________________
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.
Received on Mon 23 Jun 2008 - 13:39:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 23 Jun 2008 - 14:30:59 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive