Re: [R] Need help with text processing / string split

2011-05-15 Thread jim holtman
try this: > x <- read.table('/temp/tbl.txt', sep = ',', header = TRUE, as.is = TRUE) > # remove commas from the Cost column > x$Cost <- gsub(',', '', x$Cost) > # split the Cost > temp <- strsplit(x$Cost, "\\$") # "$" is special, so it is escaped > temp <- do.call(rbind, temp) # create a matrix >

[R] Need help with text processing / string split

2011-05-15 Thread eric
I used screen scraping to extract some information and put it into a table called tbl. Now I want to modify the table a bit so the data can be more useful. Here's the code I used: library(XML) rm(list=ls()) url <- "http://webapp.montcopa.org/sherreal/salelist.asp?saledate=05/25/2011"; tbl <-data.f