plotIndmm: Plots median movement of a marker per subject

View source: R/plotIndmm.R

plotIndmmR Documentation

Plots median movement of a marker per subject

Description

Plots median movement of a marker per subject and labels it with subject number. This function may be used to identify individual outliers. To achieve meaninful plots, use the function centerCond first.

Usage

plotIndmm(
  data,
  colNames,
  colNameSubj,
  title = "",
  xlim = NA,
  ylim = NA,
  verbose = FALSE
)

Arguments

data

Data frame containig the data columns to be plotted (among other columns).

colNames

Character vector naming the two columns for with the x/y-Values should be plotted.

colNameSubj

Character vector with a single value containig the name of the subject column of the data data-frame.

title

Character string containing the title. Default is no title.

xlim

Numeric vector of two elements defining the x-axis range of the plot. Default is empty (NA), to compute the min and max values to achieve a quadratic plot.

ylim

Numeric vector of two elements defining the y-axis range of the plot. Default is empty (NA), to compute the min and max values to achieve a quadratic plot.

verbose

Logical value. If TRUE, the function provides verbose console output.

Value

See vignette for example plots.

Author(s)

Axel Zinkernagel zinkernagel@uni-wuppertal.de

Examples

colNames <- c("A7_x",  "A7_y",  "A8_x",  "A8_y",  
              "BL2_x", "BL2_y", "BL4_x", "BL4_y",  
              "BL5_x", "BL5_y", "BL7_x", "BL7_y",        
              "BR2_x", "BR2_y", "BR4_x", "BR4_y",  
              "BR5_x", "BR5_y", "BR7_x", "BR7_y",  
              "CL4_x", "CL4_y", "CL7_x", "CL7_y",        
              "CR4_x", "CR4_y", "CR7_x", "CR7_y",  
              "DL2_x", "DL2_y", "DR2_x", "DR2_y")
              
# Select data for plotting (selecting stimulus type and omit z-axis)
data_Subj_happy <- subset(dataStdFCen, subset = (dataStdFCen$Stimulustype == "posed_happy"), 
                          select = c("subject",colNames))

plotIndmm(data = data_Subj_happy, colNames = c("CL7_x", "CL7_y"), 
          colNameSubj = "subject", title = "Posed Happy CL7")

axzinker/blenderFace documentation built on Feb. 27, 2024, 10:25 a.m.