Re: [R] how to remove . or replace it with NA?

2004-05-30 Thread Spencer Graves
It's apparently a unix command; www.r-project.org - search - R site search - sed produced at least one hit with the following example: scan(pipe(sed -e s/,$// data2), sep=,) For the rest of this comment, see the R site search. hope this helps. spencer graves Yong Wang wrote:

RE: [R] how to remove . or replace it with NA?

2004-05-30 Thread John Fox
Dear Spenser et al., sed stands for string editor, I believe, and it is a Unix utility, although there are implementations for other OS's including Windows. For Yong Wang's problem, I think that it is more natural to use the na.strings argument to read.table(), as I previously suggested, than to

RE: [R] how to remove . or replace it with NA?

2004-05-29 Thread John Fox
Dear Yong Wang, When you read the data with read.table, specify the argument na.strings=.. See ?read.table for details. I hope that this helps, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yong Wang Sent: Saturday, May 29, 2004 8:25 PM

RE: [R] how to remove . or replace it with NA?

2004-05-29 Thread Samir Mishra
If the data file is in text format, is large with a lot of .s, use sed. It's MUCH faster than any other tool for this sort of thing. -Original Message- From: Yong Wang [mailto:[EMAIL PROTECTED] Sent: Sunday, May 30, 2004 05:25 To: [EMAIL PROTECTED] Subject: [R] how to remove . or replace

RE: [R] how to remove . or replace it with NA?

2004-05-29 Thread Yong Wang
Samir, can you give an example for the use of sed? On Sun, 30 May 2004, Samir Mishra wrote: If the data file is in text format, is large with a lot of .s, use sed. It's MUCH faster than any other tool for this sort of thing. -Original Message- From: Yong Wang [mailto:[EMAIL