widen: Widen the MOAS data.frame

View source: R/widen.R View source: R/old/widen2.R

widenR Documentation

Widen the MOAS data.frame

Description

This is a function to create a widened data.frame from the MOAS. Widening of the data is necessary for performing ANOVAs and other statistical analysis, particularly if intending to run in SPSS.

Usage

widen(data, by, keep = NULL)

Arguments

data

The MOAS or a MOAS generated file.

by

Column which to widen by

keep

Option to provide to [site_keeper()] for filtering the double/triple scanned

Details

For MOAS which inclused double/triple scans, by="Site_Name", must be run prior to by="Project_Wave".

'by' options are:

  • Subject_Timepoint

  • Project_Wave

  • Site_Name

  • Site_Number

Value

A MOAS type file widened by selected column, prefixed with columns specifications

Examples

## Not run: 
widen(MOAS, by="Site_Name")
widen(MOAS, by="Project_Wave")

# Data with double/triple scans must be widened
# in a two-stage process
dt = widen(MOAS, by="Site_Name")
df = widen(dt, by="Project_Wave")

## End(Not run)


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