reformat: Reformat data to bayesact or interact-friendly format...

reformatR Documentation

Reformat data to bayesact or interact-friendly format depending on summary statistic desired.

Description

Assuming here that we've already checked that the necessary columns are present and named correctly. This reorders them and drops the unnecessary ones. It also does the grouping if desired for interact files.

Usage

reformat(data, program, stat = "mean", group = "none", groupvals = NA)

Arguments

data

dataframe to reformat (already verified that column names and types are correct)

program

bayesact or interact. Mean datasets look the same.

stat

summary statistic desired (mean, sd, or cov; interact must be mean)

group

name of grouping column (interact/mean only)

groupvals

vector length 2; unique values in grouping column

Value

reformatted data frame.


ahcombs/actdata documentation built on Jan. 15, 2025, 6:48 p.m.