Dear All:

*Re:* How to make the Month variable be called “May”,“June”, "July",
"August", "September" instead of a numeric quantity (5,6,7,8,9)


In the airquality data set, please see the code below; How to make the
Month variable be called “May”,“June”, "July", "August", "September"
instead of a numeric quantity (5,6,7,8,9)



data(airquality)

head(airquality)


#### Making Day and Month categorical variables


airquality$Day <- factor(airquality$Day)

airquality$Month <- factor(airquality$Month)


head(airquality)


> head(airquality)
  Ozone Solar.R Wind Temp Month Day
1    41     190  7.4   67     5   1
2    36     118  8.0   72     5   2
3    12     149 12.6   74     5   3
4    18     313 11.5   62     5   4
5    NA      NA 14.3   56     5   5
6    28      NA 14.9   66     5   6
>



Thank you very much for your help in advance


with thanks
abou
______________________


*AbouEl-Makarim Aboueissa, PhD*

*Professor of Statistics*
*Graduate Coordinator*

*Department of Mathematics and Statistics*
*University of Southern Maine*

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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