mutate_mean_date: Calculate or infer the mean data for data collected

View source: R/mutates.R

mutate_mean_dateR Documentation

Calculate or infer the mean data for data collected

Description

The data in LCBC are usually collected in two sets each time, one testing and one MRI. These two are usually seperated by some days to a month, but some times even more. We also miss some dates of testing for some participants. This causes some difficulties when calculating ages etc.

Usage

mutate_mean_date(data)

Arguments

data

MOAS-like data

Details

This function will create a new column named code[date], which will contain wither the mean date between MRI and test, given we have dates on both, or either one of test or MRI date we have. If both are missing, the function will add in the mean date for the specific Project and Wave of collection, in order to properly order the data in most likely chronological order.

Value

data frame


LCBC-UiO/MOAS documentation built on Aug. 28, 2023, 3:29 a.m.