s-news
[Top] [All Lists]

Re: character to numeric

To: <Cougar@psu.edu>
Subject: Re: character to numeric
From: "Stephen Weller" <s.weller@attbi.com>
Date: Sun, 18 Aug 2002 22:23:28 -0700
Cc: <s-news@lists.biostat.wustl.edu>
References: <000001c246eb$d628c450$3e1a7680@meth.hhdev.psu.edu>
One way to do this is to use the 'filter=' argument that is part of the
importData() function, e.g:

importData(..., filter="identity==\"I*\" | identity==\"S*\"",...),

where 'identity' is the column name for the text column.


Steve Weller


From: "Frank Lawrence" <Cougar@psu.edu>
To: <s-news@lists.biostat.wustl.edu>
Sent: Sunday, August 18, 2002 12:17 PM
Subject: [S] character to numeric


> I have multiple data files [ASCII format]. Each file is sequentially
> numbered and contains a combination of text and numbers.  My interest in
> the text is only to identify rows. I want the rows that begin with 'I'
> or 'S'.  There are multiple occurrences of the 'I' and 'S' rows in each
> data file.  I want to extract the numbers in those rows that begin with
> 'I' or 'S' for further analysis.  Each row of interest contains 8
> columns of numbers.  I would like to put those columns of numbers in 8
> separate columns of a data frame.  Furthermore, I would like to put in a
> row of "NA" if the row does not exist in the data file.
>
>
> Respectfully,
> Frank R. Lawrence
>
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news


<Prev in Thread] Current Thread [Next in Thread>