interval_to_rows: Interval to data frame rows

View source: R/interval_to_rows.R

interval_to_rowsR Documentation

Interval to data frame rows

Description

This function reshapes a data frame from a given interval to continuously spaced rows.

Usage

interval_to_rows(df, newVar, from, to, by, removeBounds = TRUE)

Arguments

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.

Value

Reshaped data frame.


steffenhartmeyer/lightdosimetry documentation built on Jan. 29, 2024, 12:48 p.m.