From ggrothendieck at gmail.com  Wed Aug 30 22:12:42 2006
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Wed, 30 Aug 2006 16:12:42 -0400
Subject: [Rd] Suggestion for read.table()
In-Reply-To: <6769639.199881156968166072.JavaMail.root@vms070.mailsrvcs.net>
References: <6769639.199881156968166072.JavaMail.root@vms070.mailsrvcs.net>
Message-ID: <971536df0608301312u24038aa9g93b5f8a658aac13a@mail.gmail.com>

Try this:

> raw=
+ "  x   y  z
+   1   2  3
+   4   5  6
+ "
> read.table(textConnection(raw), header = TRUE)
  x y z
1 1 2 3
2 4 5 6



On 8/30/06, gilescrane at verizon.net <gilescrane at verizon.net> wrote:
> First, I compliment you all
> for such a useful project as R.
>
> Suggestion:  If read.table() could
> take input from a character string,
> then one could write
>
> raw=
> "  x   y  z
>   1   2  3
>   4   5  6
> "
> df = read.table(raw,head=TRUE)
>
> Of course, one can
> cat() to write raw into a
> temporary file,
> and read.table() from that file.
> However, direct reading
> might be a good option?
>
> Hope this is useful.
> Cordially
> Giles Crane
> gilescrane at verizon.net
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>




[Rd] Suggestion for read.table()
Gabor Grothendieck