Learn R Programming

AnimalSequences (version 0.2.0)

element_covariate_network: Plot the network of elements and covariates based on the long format of sequences

Description

Plot the network of elements and covariates based on the long format of sequences

Usage

element_covariate_network(
  sequences_long,
  cutoff = 3,
  element,
  covariate,
  n_permutations = 1000,
  pvalue = 0.01,
  clusters = FALSE
)

Value

plot of bimodal network containing the elements and covariates

Arguments

sequences_long

A data frame containing the sequences, with columns for elements and contexts.

cutoff

minimum number of occurrences for which element or covariate should be included

element

A string specifying the column name for elements in the sequences data frame.

covariate

A string specifying the column name for contexts in the sequences data frame.

n_permutations

An integer specifying the number of permutations for the bootstrapping process.

pvalue

cutoff pvalue to include combination

clusters

should clusters be calculated and added?