Description Usage Arguments Value Author(s) See Also Examples
Create a from-to edge matrix with the scagnostic weights.
1 2 3 4 5 6 7 | scagEdgeWeights(data,
scags = c("Clumpy", "NotClumpy", "Monotonic", "NotMonotonic",
"Convex", "NotConvex", "Stringy", "NotStringy",
"Skinny", "NotSkinny", "Outlying","NotOutlying",
"Sparse", "NotSparse", "Striated", "NotStriated",
"Skewed", "NotSkewed"),
combineFn = NULL)
|
data |
object to calculate scagnostics on: NG_data, a vector, a matrix or a data.frame. |
scags |
Single element or a subset of (with possible a "Not" preceding): |
combineFn |
Must be a function that takes in a vector of length |
a named list with fromToEdgeMatrix
being a matrix and
nodeNames
being a vector.
Adrian Waddell and R. Wayne Oldford
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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,]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.