Hello,

I am trying to plot the hourly standard deviation of wind speeds from
13 different measured locations over many years. I imported the data
using readLines and into a dataframe called finalData. Using tapply, I
determined the standard deviation of the windspeed (ws) for each hour
(hour) from every location (stn) using this command line:

statHour = tapply(finalData$ws,list(finalData$stn,finalData$hour),sd)

I want to plot the standard deviation for each hour of the day, with
hours as the x-axis and the standard deviation for the y-axis, and
each station as a different color.  I've managed to get a boxplot of
this, but ideally, I'd like a scatter plot to determine the variations
between each instrument throughout the day.  The boxplot command is
this:

boxplot(statHour, names=colnames(statHour),xlab='Hour of the
Day',ylab='Standard Deviation of Wind Speed')

I also tried to make a dataframe of the tapply output but it ends up
using the hours as the column names instead of putting it into the
dataframe.  Please help!!

I have R version 3.1.1

Thanks a lot,
Alexandra

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to