The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

KwokC (1) [Avatar] Offline
Dear Robert,
I would like to raise a question about Factors discussed in Section 2.2.5. I understand that a thread about Factors has already been created but I do not know how to create a query under this thread.

The second last paragraph on p33 reads, "The statement status <- factor (status, ordered = TRUE) will encode the vector as (3,2,1,3) and associate these values internally as 1=Excellent, 2=Improved, and 3=Poor."

Does R assign these values internally? If R does assign these values, could you please explicitly spell out the rule? If not, how may the user assign these values? I beg your pardon if I have overlooked any clue about internal association of values with ordinal variables. Thanks in anticipation.