Skip to contents

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)
#> Error in frameMatrix[fmCorr[i], fmCorr[j] + 2] = changeDF[i, j + 2]: incorrect number of subscripts on matrix