Description Usage Arguments Examples
Expand data over missing value This is particularly useful for graphing (where you wnant NAs to indicate missing data) This can also be useful when calculating rolling means, etc
1 | expandData(df, mxt.key.cols)
|
df |
is a data.frame of data |
mxt.key.cols |
is a character vector that specifies the columns for which you want all combinations of OR mxt.key.cols is a named list, where the values of the list are additional levels to include |
1 2 3 | df <- data.frame(a = 1:4, b = c('A','B','C','D'), c = runif(4), stringsAsFactors=FALSE)
expandData(df, c('a','b'))
expandData(df, list(a = c(1:10), b=LETTERS))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.