ena.group: Compute summary statistic for groupings of units using given...

View source: R/ena.group.R

ena.groupR Documentation

Compute summary statistic for groupings of units using given method (typically, mean)

Description

Computes summary statistics for groupings (given as vector) of units in ena data using given method (typically, mean); computes summary statistic for point locations and edge weights for each grouping

Usage

ena.group(
  enaset = NULL,
  by = NULL,
  method = mean,
  names = as.vector(unique(by))
)

Arguments

enaset

An ENAset or a vector of values to group.

by

A vector of values the same length as units. Uses rotated points for group positions and normed data to get the group edge weights

method

A function that is used on grouped points. Default: mean(). If 'enaset' is an ENAset, enaset$points.rotated will be groups using 'mean' regardless of 'method' provided

names

A vector of names to use for the results. Default: unique(by)

Value

A list containing names, points, and edge weights for each of the unique groups formed by the function

Examples

data(RS.data)

codeNames = c('Data','Technical.Constraints','Performance.Parameters',
  'Client.and.Consultant.Requests','Design.Reasoning','Collaboration');

accum = ena.accumulate.data(
  units = RS.data[,c("UserName","Condition")],
  conversation = RS.data[,c("Condition","GroupName")],
  metadata = RS.data[,c("CONFIDENCE.Change","CONFIDENCE.Pre","CONFIDENCE.Post")],
  codes = RS.data[,codeNames],
  window.size.back = 4
)

set = ena.make.set(
  enadata = accum
)

means = ena.group(set, "Condition")



rENA documentation built on March 26, 2022, 1:10 a.m.