Description Usage Arguments Examples
This function allows for trimming esm data down so that only days (or people) with a minimum number of observations
are included. If there is a 'missed' variable (coded 1 = missed) these rows will not be counted. To
make sure enough observations of a particular variable are included, use trim_min_valid_obs
.
1 | trim_min_obs(data, grouping, min.obs = 2)
|
data |
The input dataset |
grouping |
The grouping variables within which you require a minimum observation number. Could be just your person id or your person id and day. Should take the form of a character vector. |
min.obs |
The minimum number of observations to require. Defaults to 2. |
1 2 | # Trim the sleep dataset to have 2 obs per ID (this does nothing, but illustrates syntax)
trim_min_obs(sleep, grouping = 'ID', min.obs = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.