smoothData | R Documentation |
Smooth one column of a dataframe that has time nested in people (e.g., the function is applied one person at a time) with a user specified smoothing window
smoothData(basedata, window, personId, obs_name)
basedata |
A user provided dataframe. |
window |
A number specifying the window size to be smoothed over. |
personId |
The variable in the dataframe specifying person ID. |
obs_name |
The name of the column in the dataframe that has the time-varying observable (e.g., the variable that will be smoothed). |
The original dataframe with an additional column holding the smoothed observation variable, called "obsSmooth"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.