filter_site: Utility function for reducing double/triple scans to a single...

View source: R/filters.R

filter_siteR Documentation

Utility function for reducing double/triple scans to a single row

Description

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.

Usage

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

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'

Value

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

Examples

## Not run: 
filter_site(MOAS)
filter_site(MOAS, 'ousSkyra')
filter_site(MOAS, 'ousAvanto')

## End(Not run)


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