[R] Need Help with Manipulating Columns

Erik Iverson eriki at ccbr.umn.edu
Tue Apr 6 22:12:39 CEST 2010

Erik Iverson wrote:
> possible hint:
> as.numeric(gsub("\\$", "", c("$1.23", "$1.32")))

and convert to character first before as.numeric if they were factors to 
begin with...

> cavalier33901 wrote:
>> I have uploaded the property data from Lee County Property Appraiser 
>> into R,
>> but my problem is that I am unable manipulate and use many of the columns
>> because they are classified as factors.  I think this is because the 
>> values
>> represent selling prices and therefore have $ in front of them.  I tried
>> using as.integer but this funtion converts the values into a totaly 
>> useless
>> form.  Is there a way to convert these columns from factors into 
>> something
>> usefull for plotting and graphing such as integer form? Thanks
>> Will
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list