[R] Changing values

jim holtman jholtman at gmail.com
Sun Aug 3 23:55:17 CEST 2008


Exactly how is the translation of "X9-" -> 00911 done?  Are there
unique mappings of character sequences to numbers?  How many different
ones might there be?   Why do you have leading zeros on the result?
If they are changed to numeric, then the default printing results in
'911'.  Can you provide an idea of what you data looks like - e.g.,
str(yourData).  Is this to be done on all, or selected, columns?  You
need to provide a bit more background so that we can understand the
problem you are trying to solve.

On Sun, Aug 3, 2008 at 4:54 PM, Andrew Ramsey
<aramsey at schoolph.umass.edu> wrote:
> Hello--
>
> I am a relatively new user to R and I cannot find the information I need.
> Please help.
>
> I have a very large data set with values including letters, numbers, and
> symbols (sometimes within the same vector value [ie X9-].
>
> I've imported the data using read.fwp and it arrives in list format.
>
> I'd like to change the letters and symbols to numbers (ie X9-  ->  00911) in
> every entry.
>
> How would you recommend I try to do so?
>
> Thank you!
>
> ______________________________________________
> 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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?



More information about the R-help mailing list