[R] Plotting ordered nominal data

Sandy Small sandy.small at nhs.net
Fri Aug 1 17:21:29 CEST 2008


Hi
I'm sure this question has been asked before but I can't find it in the 
archives.
I have a data frame which includes interval and ordered nominal results. 
It looks something like

"Measured"      "Eyeball"
46.5   Normal
43.5   Mild
56.2   Normal
41.1   Mild
37.8   Moderate
12.6   Severe
17.3   Moderate
39.1   Normal
26.7   Mild
NULL   Normal
27.9   NULL
68.1   Normal

I want to plot the Measured value against the "Eyeball" value but if I 
simply plot it the "Eyeball" values are plotted in alphabetical order. I 
do not want to change the "names" as "Normal, Mild, Moderate, Severe" 
are standard but I want to plot them in the order "Normal", "Mild", 
"Moderate", "Severe" so that the trend (or not) is obvious.

Any help would be much appreciated.
Many thanks
Sandy

***********************************************************************
This  message  may  contain  confidential and  privileged  information.
If you  are not the  intended recipient  you should not  disclose, copy
or distribute information in this e-mail or take any action in reliance
on its contents.  To do so is strictly  prohibited and may be unlawful.
Please  inform  the  sender that  this  message has  gone astray before
deleting it.  Thank you.

2008 marks the 60th anniversary of the NHS.  It's an opportunity to pay
tribute to the NHS staff and volunteers who help shape the service, and
celebrate their achievements.

If you work for the NHS  and  would like  an NHSmail  email account, go
to: www.connectingforhealth.nhs.uk/nhsmail



More information about the R-help mailing list