View source: R/select_relevant_rows.r
select_relevant_rows | R Documentation |
This function returns the data frame with the beginning and trailing rows that are all NA removed, it also returns updated first_measurement_index
and timestamp
variables. The timestamp may advance as a result of the data frame starting with three or more NA's.
select_relevant_rows(data, timestamp, net_cfg)
data |
a data frame |
timestamp |
the date of the first measurement in the format |
net_cfg |
a net_cfg object providing metadata about the networks |
This function returns a list with three elements, data
is the modified data frame, first_measurement_index
is the possibly adjusted first_measurement index, and timestamp
is the possibly updated timestamp (day).
data <- data.frame(id=c(NA,NA,NA,1,1,NA),tijdstip=c(NA,NA,NA,3,4,NA),something=c(NA,NA,NA,9,16,NA)) data net_cfg <- new_net_cfg() net_cfg$measurements_per_day <- 2 select_relevant_rows(data,'2014-05-06',net_cfg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.