Displaying 1 result from an estimated 1 matches for "samplesperday".
2013 Jan 12
1
How to extract value for specific rows in an array?
...value.
So far I have been able to sample the max daily depth in a 1-column array
using the loop below. I tried creating a new empty array for recording the
date for each daily max depth value, but it doesn't seem to be working...
Any ideas or suggestions?
DF <- data.frame(date,day,depth)
samplesperday <- 2*60*24 # number of datapoints per day (2880 here)
nbdays<- nrow(DF)/samplesperday # number of days in the dataset (5 here)
MaxDepth <- array(NaN,c(nbdays,1)) # create empty array where max depth
values will be stored
Date <- array(NaN,c(nbdays,1)) # create empty array where date...