View source: R/interval_to_rows.R
interval_to_rows | R Documentation |
This function reshapes a data frame from a given interval to continuously spaced rows.
interval_to_rows(df, newVar, from, to, by, removeBounds = TRUE)
df |
The data frame to be reshaped. |
newVar |
Name of the new variable holding the row indices. |
from |
Start of interval. Numeric or POSIXct. |
to |
End of interval. Numeric or POSIXct. |
by |
Numeric. Spacing between individual rows. Needs to be in same unit as interval variables (e.g., seconds for POSIXct) |
removeBounds |
Logical. Should start and end variables be removed? Defaults to TRUE. |
Reshaped data frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.