Learn R Programming

rENA (version 0.2.7)

ena.group: 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))
)

Value

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

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)

Examples

Run this code
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")


Run the code above in your browser using DataLab