[R] Regular Expressions for "Large" Data Set

Abraham Mathew
Tue, 07 Jun 2011 20:55:19 -0000

I'm running R 2.13 on Ubuntu 10.10

I have a data set which is comprised of character strings.

site = readLines('http://www.census.gov/tiger/tms/gazetteer/zips.txt')

dat <- c("01, 35004, AL, ACMAR, 86.51557, 33.584132, 6055,
0.001499")
dat

I want to loop through the data and construct a data frame with the zip
code,
state abbreviation, and city name in seperate columns. Given the size of
this
data set, I was wondering if there was an efficient way to get the desired
results.

Thanks
Abraham


WebRep
Overall rating

	[[alternative HTML version deleted]]