Displaying 1 result from an estimated 1 matches for "wind_dir_corrected".
2006 Mar 16
1
filling a matrix with data
...data...
I'm not very experienced at using R, so please forgive the crudeness of
these codes...
# For the matrix
wind_dir_data<-matrix( NA, 17, 365 , byrow = FALSE )
wind_speed_data<-matrix( NA, 17, 365, byrow = FALSE )
# to put the data into the matrix
wind_dir_data[level, ]<-wind_dir_corrected
wind_speed_data[level, ]<-rwind
#This is the response from R: "Error in "[<-"(`*tmp*`, level, , value =
c(-0.889991788193583, -1.45999177545309, :
number of items to replace is not a multiple of replacement length"
If I try to call the data using wind_dir_data[1,...