All great ideas. I tried strsplit first and it worked, but thanks everyone!
Best-
LB
On 9/25/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> Perhaps you could clarify what the general rule is but assuming
> that what you want is any word after a colon it can be done with
> strapply in the gsu
Perhaps you could clarify what the general rule is but assuming
that what you want is any word after a colon it can be done with
strapply in the gsubfn package like this:
Lines <- c("Year Built: 1873 Gross Building Area: 578 sq ft",
"Total Rooms: 6 Living Area: 578 sq ft")
library(gsubfn)
str
On 25-Sep-07 20:39:11, lucy b wrote:
> Dear List,
>
> I have an ascii text file with data I'd like to extract. Example:
>
> Year Built: 1873 Gross Building Area: 578 sq ft
> Total Rooms: 6 Living Area: 578 sq ft
>
> There is a lot of data I'd like to ignore in each record, so I'm
> hoping th
Here is one way. You can setup a list of the patterns to match
against and then apply it to the string. I am not sure what the rest
of the text file look like, but this will return all the values that
match.
> x <- readLines(textConnection("Year Built: 1873 Gross Building Area: 578 sq
> ft
+
On Tue, 2007-09-25 at 16:39 -0400, lucy b wrote:
> Dear List,
>
> I have an ascii text file with data I'd like to extract. Example:
>
> Year Built: 1873 Gross Building Area: 578 sq ft
> Total Rooms: 6 Living Area: 578 sq ft
>
> There is a lot of data I'd like to ignore in each record, so I'm
have you seen help(strsplit)?
On Tue, 25 Sep 2007, lucy b wrote:
> Dear List,
>
> I have an ascii text file with data I'd like to extract. Example:
>
> Year Built: 1873 Gross Building Area: 578 sq ft
> Total Rooms: 6 Living Area: 578 sq ft
>
> There is a lot of data I'd like to ignore in each
Dear List,
I have an ascii text file with data I'd like to extract. Example:
Year Built: 1873 Gross Building Area: 578 sq ft
Total Rooms: 6 Living Area: 578 sq ft
There is a lot of data I'd like to ignore in each record, so I'm
hoping there is a way to use strings as delimiters to get the da
7 matches
Mail list logo