colorByAverageValueOfOtherVariable {BallMapper} | R Documentation |
Produce a new coloring vector being an average of values of given function at points covererd by each vertex of Ball Mapper graph.
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
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)
[Package BallMapper version 0.2.0 Index]