###################################################################### # Lincoln wind speed - summaries # # # ###################################################################### ###################################################################### #Read in data # May need to set folder location of file # This will not be needed if you open the program from the folder where the data is located # setwd(dir = "C:\\Chris\\data") #Set this to your own folder wind <- read.csv(file = "Lincoln_Feb_wind.csv") #wind #Shows whole data set - probably do not want to due to number of observations head(wind) #Shows first 6 observations tail(wind) #Shows last 6 observations ################################################################################ # Plot hist(x = wind$y, main = "Daily wind speed for Lincoln in February", xlab = "Wind speed", freq = FALSE, xlim = c(0,25)) delta <- 2.1327 gamma <- 1.8832 beta <- 6.2926 curve(expr = gamma * (x - delta)^(gamma-1) / (2*beta^2) * exp( - (x - delta)^gamma / (2*beta^2)), from = delta, to = 35, col = "red", add = TRUE) #