Learn R Programming

rENA (version 0.3.0)

accumulate: Accumulate Connection Counts for ENA

Description

This function takes a data.frame and accumulates co-occurrences of codes within specified units and conversations (horizon), preparing it for ENA. It's designed to be used with pipes (`|>`)..

Usage

accumulate(
  x,
  units = rENA::units(x),
  codes = rENA::codes(x),
  horizon = rENA::horizon(x),
  ...,
  ordered = FALSE,
  binary = TRUE
)

Value

An ena.set object containing the accumulated connection counts and metadata.

Arguments

x

A data.frame or similar object containing the data to be analyzed.

units

A character vector specifying the columns that define the units of analysis.

codes

A character vector specifying the columns that contain the codes for co-occurrence analysis.

horizon

A character vector specifying the columns that define the conversational boundaries (horizon).

...

Additional arguments passed to underlying accumulation functions.

ordered

A logical value. If TRUE, creates ordered networks (A -> B is different from B -> A). Defaults to FALSE.

binary

A logical value. If TRUE, connection counts are binarized (0 or 1). Defaults to TRUE.

Examples

Run this code
data(RS.data)

codes <- c("Data", "Technical.Constraints", "Performance.Parameters",
           "Client.and.Consultant.Requests", "Design.Reasoning",
           "Collaboration")
units <- c("Condition", "UserName")
horizon <- c("Condition", "GroupName")
enaset <- RS.data |>
  accumulate(units, codes, horizon)

Run the code above in your browser using DataLab