complete_observations | R Documentation |
This is an internal function that is used to remove incomplete observations
from a data.frame
. It removes (1) explicit NAs and (2) cases with
implicit NAs, i.e. participants who did not provide observations for all
combinations of (possibly multiple) within-subjects factors.
complete_observations(data, id, within, dv)
data |
The |
id |
Character. Name of the column containing the subject identifier. |
within |
Character. Names of the columns containing within-subjects factors. |
dv |
Character. Name of the column containing the dependent variable. |
A data.frame
where NAs and incomplete observations are removed.
It also has up to two additional attributes removed_cases_explicit_NA
and removed_cases_implicit_NA
, carrying the subject identifiers of
participants whose data has been removed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.