df.to.gbi.focal: Converts a data frame of individual associations into a group...

View source: R/df.to.gbi.focal.R

df.to.gbi.focalR Documentation

Converts a data frame of individual associations into a group by individual matrix.

Description

Converts a data frame of individual associations into a group by individual matrix.

Usage

df.to.gbi.focal(df, focal, alters, ctrl)

Arguments

df

a data frame in which to include a control column.

scan

a numeric or character vector representing one or more columns used as scan factors.

id

a numeric or character vector indicating the column holding ids of individuals.

Details

Control factors are used in permutation approaches to constrain their permutations.

Value

The same data frame input with an extra column named 'control', representing the control factors.

Author(s)

Sebastian Sosa, Ivan Puga-Gonzalez.

Examples

df.to.gbi.focal(df=sim.focal.undirected,focal='focal', alters='alter',ctrl='nfocal')

SebastianSosa/ant documentation built on Sept. 23, 2023, 7:06 a.m.