Introduction to Statistics Using R - Homework 2
1.
a) Read the file attitude.dat using read.table. Download file attitude.dat.
b) The "-99" values denote missing data. Replace these with the appropriate missing value.
c) Find the mean and stnadard deviation of "privileges". You may want to use option, na.rm=T.
d) Create histograms of "rating" and "complaints". Explore options in both "par()" and "hist()".
e) Create a scaterplot of "rating" and "complaints". The command "split.screen" may be of interest.
f) Save the plot in e) as an .ps file.
2. Create a function that casts a die n times, calculates the average after each throw and displays the averages.
--
TatsukiKoyama - 12 Mar 2004