Dear R users,

apologies for this quite simple question. I've tried serverall approaches, however, could not generate the desired result.

I have a large data frame, which has several cathegories encoded as character strings, for example.

Name, income, gender, ...
...  "from 1000$ to 2000$"  ...
...  "from 2000$  to 3000$" ...
...  "more than 3000$"        ...
...  "from 1000$ to 2000$"  ...
...  "from 1000$ to 2000$"  ...


How can I transform this column into numeric values for the categories, for example in somethins like this:
... 1000 ...
... 2000 ...
... 3000 ...
... 1000 ...
... 1000 ...

______________________________________________
R-help@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.

Reply via email to