View source: R/gr_evalPoints.R
evalPoints | R Documentation |
Generates a matrix of evaluation points, used by the extremal coefficients estimator.
evalPoints(obj, ...) ## S3 method for class 'Coordinates' evalPoints(obj, obj2, x, ...) ## S3 method for class 'RootDepSet' evalPoints(obj, x, U, ...)
obj |
Object of class |
... |
additional arguments |
obj2 |
Object of class |
x |
A named vector of coordinates of length |U|, where U is the set of nodes with available data. |
U |
The set of nodes with observable data |
An object of the same class as the argument obj
containing a matrix of coordinates.
# create an object of class Adjacent adjobj<- Adjacent() # create a graph with named vertices g<- graph(c("a", "b", "b", "c", "b", "d"), directed = FALSE) # create a dataset with named columns mydata<- matrix(rnorm(10*4), ncol=4, nrow=10) colnames(mydata)<- get.vertex.attribute(g, "name", V(g)) # create object of class Network mytree<- Tree(g, mydata) # create the vector of coordinates and name it x<- c(1:vcount(g)) names(x)<- c("a", "b", "c", "d") # create the matrix of adjacent coordinates mycoord<- evalPoints(adjobj, mytree, x) # create a matrix of pair coordinates mytup<- Tuples() mytup<- evalPoints(mytup, mytree, x) # create matrix of coordinates when there are missing data nodes mydata<- matrix(rnorm(10*3), ncol=3, nrow=10) colnames(mydata)<- c("b", "c", "d") mytree<- Tree(g, mydata) x<- c(1:vcount(g)) names(x)<- c("a", "b", "c", "d") mytrip<- Triples() evalPoints(mytrip, mytree, x) # create a matrix of coordinates for an arbitrary subsets rdsobj<- RootDepSet() rds_values<- list(b=c("c", "d"), c=c("b", "d"), d=c("b", "c")) rds_roots<- c("c", "d", "b") rdsobj<- setRootDepSet(rdsobj, rds_values, rds_roots) x<- c(2,3,4) names(x)<- c("b", "c", "d") evalPoints(rdsobj, x, getNodesWithData(mytree))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.