returns a MOAS data.frame with one row per participant and timepoint (i.e. removes double/triple scan entries). For analyses not intending to use the power of double/triple scans, or for data which will be widened and scanner type/site is not of interest. Only subject timepoints that have several entries (i.e. several scan sites), will be reduced. All timepoints will be retained.

filter_site(
  data,
  keep = "long",
  tie = "interval",
  site_order = c("ousPrisma", "ousSkyra", "ousAvanto"),
  quiet = F
)

Arguments

data

The MOAS or a MOAS generated file.

keep

A string specifying which data from double/triple scans to keep.

tie

string indicating given a tie in the "long" keep option, what to keep.

site_order

string vector of the scanner priority given a tie between scanners

quiet

logical, TRUE sets it to verbose

Value

A MOAS type file with one line per subject and timepoint.

Details

Available options for 'keep' are:

  • "long"keep data from scanner with most data (default)

  • "ousAvanto"keep 'ousAvanto'

  • "ousSkyra"keep 'ousSkyra'

  • "ousPrisma"'ousPrisma'

Available options for 'tie' are:

  • "interval"keep data from scanner with longest data interval (default)

  • "ousAvanto"keep 'ousAvanto'

  • "ousSkyra"keep 'ousSkyra'

  • "ousPrisma"'ousPrisma'

Examples

if (FALSE) { filter_site(MOAS) filter_site(MOAS, 'ousSkyra') filter_site(MOAS, 'ousAvanto') }