colorByAverageValueOfOtherVariable: Produce a new coloring vector being an average of values of...

Description Usage Arguments Value

View source: R/BallMapper.R

Description

Produce a new coloring vector being an average of values of given function at points covererd by each vertex of Ball Mapper graph.

Usage

1
2
colorByAverageValueOfOtherVariable(outputFromBallMapper,
  newFunctionOnPoints)

Arguments

outputFromBallMapper

an output from the BallMapper function

newFunctionOnPoints

values of function on points.

Value

Vector of function values on vertices on Ball Mapper graph. var <- seq(from=0,to=6.3,by=0.1) points <- as.data.frame( cbind( sin(var),cos(var) ) ) values <- as.data.frame(sin(var)) l <- BallMapper(points, values, 0.25) ColorIgraphPlot(l) new_coloring <- colorByAverageValueOfOtherVariable(l,cos(var)) l$coloring <- new_coloring ColorIgraphPlot(l)


BallMapper documentation built on Aug. 21, 2019, 1:06 a.m.