Re: [R] Obtaining the internal integer codes of a factor XXXX

2013-03-25 Thread William Dunlap
, labels=c("I","II","III")) Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -----Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Rui Barradas > Sent: Monday, March 25, 2013 9:

Re: [R] Obtaining the internal integer codes of a factor XXXX

2013-03-25 Thread Rui Barradas
Hello, Though I have the same doubt as Bert, the following seems to make more sense. seq_along(levels(fdata)) Hope this helps, Rui Barradas Em 25-03-2013 15:37, Dan Abner escreveu: Hi everyone, I understand the process of obtaining the internal integer codes for the raw values of a facto

Re: [R] Obtaining the internal integer codes of a factor XXXX

2013-03-25 Thread Duncan Murdoch
On 25/03/2013 11:37 AM, Dan Abner wrote: Hi everyone, I understand the process of obtaining the internal integer codes for the raw values of a factor (using as.numeric() as below), but what is the best way to obtain these codes for the levels() of a factor (since the as.numeric() results don't r

Re: [R] Obtaining the internal integer codes of a factor XXXX

2013-03-25 Thread Bert Gunter
Why do you think you need to do this? (Feel free to ignore, however). -- Bert On Mon, Mar 25, 2013 at 8:37 AM, Dan Abner wrote: > Hi everyone, > > I understand the process of obtaining the internal integer codes for > the raw values of a factor (using as.numeric() as below), but what is > the b

[R] Obtaining the internal integer codes of a factor XXXX

2013-03-25 Thread Dan Abner
Hi everyone, I understand the process of obtaining the internal integer codes for the raw values of a factor (using as.numeric() as below), but what is the best way to obtain these codes for the levels() of a factor (since the as.numeric() results don't really make clear which code maps to which l