Write the R command to produce a table where the rows are th

Write the R command to produce a table where the rows are the YEARS (yr), the columns are the months (1 through 12) and the entries are the maximum temperature for that month and year. Write the R command to produce a table with the same row and column headings, but the entries are the average temperature for that month and year. Write the R command to produce a table with the same row and column headings, but the entries are the minimum temperatures for that month and year, and the top and bottom 10% are discarded as outliers.

Solution


#creating years column 2000 to 2016
years<-2000:2016
#creating the dataframe
df<-data.frame(\"YEARS\"=years,
\'Month1\'= round(runif(17, 0.0, 60),2),
\'Month2\'= round(runif(17, 0.0, 60),2),
\'Month3\'= round(runif(17, 0.0, 60),2),
\'Month4\'= round(runif(17, 0.0, 60),2),
\'Month5\'= round(runif(17, 0.0, 60),2),
\'Month6\'= round(runif(17, 0.0, 60),2),
\'Month7\'= round(runif(17, 0.0, 60),2),
\'Month8\'= round(runif(17, 0.0, 60),2),
\'Month9\'= round(runif(17, 0.0, 60),2),
\'Month10\'= round(runif(17, 0.0, 60),2),
\'Month11\'= round(runif(17, 0.0, 60),2),
\'Month12\'= round(runif(17, 0.0, 60),2))

 Write the R command to produce a table where the rows are the YEARS (yr), the columns are the months (1 through 12) and the entries are the maximum temperature

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site