data(olive)
ng.olive <- ng_data(name = "Olive",
data = olive[,-c(1,2)],
shortnames = c("p1","p2","s","ol","l1","l2","a","e"),
group = as.numeric(olive$Area)+1
)
edgeWts <- scagEdgeWeights(data = ng.olive,
scags = c("Clumpy", "Skinny"),
combineFn = max)
edgeWts$fromToEdgeMatrix[1:3,]
edgeWts <- scagEdgeWeights(data = ng.olive,
scags = c("Clumpy", "Skinny"),
combineFn = function(x){
2*x[1]+3*x[2]
})
edgeWts$fromToEdgeMatrix[1:3,]
Run the code above in your browser using DataLab