Write the R command to produce a table where the rows are the YEARS (yr), the co
ID: 3782678 • Letter: W
Question
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.Explanation / Answer
#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))
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.