combine_data {forceplate}R Documentation

Combine Data Tables

Description

Combine two data.tables, either two force-plate data, two exeperimental data, or one force-plate and one experimental data.

Usage

combine_data(
  dt1,
  dt2,
  by = list(subj = "subj", block = "block", trial = "trial"),
  continuous = FALSE
)

Arguments

dt1

A data.table of the class fp.segm, fp.tl, or exp.prep.

dt2

A data.table of the class fp.segm, fp.tl, or exp.prep. Make sure the two data.table have either the same number of rows or the same columns.

by

A list of three variable names in the experimental data that reflect the subj (subject number), block (block number), and trial (trial number) in the force-plate data. This argument is only necessary for combining experimental data with force-plate data.

continuous

A logical value. Default is FALSE, meaning the variable for the trials in the used experimental data.table counts for each block separately, that is in each block it counts from 1 to the number of trials in that block. If TRUE it is assumed that the trials are counted from 1 to the total number of trials of a subject.

Value

A data.table either of the same class as dt1 and dt2, if they share the same class, or of the class dt.comb.

Author(s)

Raphael Hartmann & Anton Koger


[Package forceplate version 1.1-3 Index]