2,Compute the monthly averages of daily maximum temperatures. 3,Create a new dat
ID: 3074621 • Letter: 2
Question
2,Compute the monthly averages of daily maximum temperatures.
3,Create a new data frame of data set excluding days the of the column which the variable is less than 31 km/h.
I need the command to answer these question with R Studio! Thx
Date.Time 1 1/1/2017 2 1/2/2017 3 1/3/2017 4 1/4/2017 5 1/5/2017 6 1/6/2017 7 1/7/2017 8 1/8/2017 9 1/9/2017 Month Max.Temp... Spd.of.Max.Gust..km.h Year 2017 2017 2017 2017 2017 2017 2017 2017 2017 10 1/10/2017 2017 11 1/11/2017 2017 12 1/12/2017 2017 131/13/2017 2017 14 1/14/2017 2017 15 1/15/2017 2017 16 1/16/2017 2017 17 1/17/2017 2017 Day Mean·Temp C. 2.0 3.3 3.2 2.5 -6.8 -5.6 1.8 39 6.0 2.2Explanation / Answer
1)
You can use 'acf' to get the autocorrelation of any variable.
So, assuming that your data file name is 'data', for each variable you can use the following syntax -
Please note that you will have to complete the variable name which I have put dots for because the variable full name is not visible.
----------------------------------------
2)
Use following syntax -
tapply(data$Max.Temp..., INDEX = data$Month, FUN = mean)
----------------------------
3)
Use the following code -
data <- data[!(data$Spd.of.Max.Gust.. < 31),]
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.