updateFrameMatrixFromDF: Update 'frameMatrix' from an external source.

View source: R/track_bridge.R

updateFrameMatrixFromDFR Documentation

Update frameMatrix from an external source.

Description

Update frameMatrix from an external source.

Usage

updateFrameMatrixFromDF(frameMatrix, changeDF)

Arguments

frameMatrix

The frameMatrix object to be changed.

changeDF

The data frame containing new values.

Value

An updated frameMatrix. The lower triangular matrix of frameMatrix will be read, and the values will be flipped (e.g. 'group-inidividual' becomes 'individual-group') and subsequently added to the upper triangular matrix.

Examples

sbc007 = undupeLayers(sbc007, "trail", "name")
sbc007 = addFrameMatrix(sbc007)
#(After exporting the frame matrix and editing it)
inpath = system.file("extdata", "rez007_frame_edited.csv", package = "rezonateR")
newFrame = rez_read_csv(inpath, origDF = frameMatrix(sbc007))
frameMatrix(sbc007) = updateFrameMatrixFromDF(frameMatrix(rez007), newFrame)

johnwdubois/rezonateR documentation built on Nov. 19, 2024, 11:17 p.m.