R/mytriangle.R

Defines functions mytriangle

Documented in mytriangle

mytriangle <- 
function(coords, v=NULL, params) {
  vertex.color <- params("vertex", "color")
  if (length(vertex.color) != 1 && !is.null(v)) {
    vertex.color <- vertex.color[v]
  }
  vertex.size <- 1/200 * params("vertex", "size")
  if (length(vertex.size) != 1 && !is.null(v)) {
    vertex.size <- vertex.size[v]
  }

  symbols(x=coords[,1], y=coords[,2], bg=vertex.color,
          stars=cbind(vertex.size, vertex.size, vertex.size),
          add=TRUE, inches=FALSE)
}

Try the SubpathwayGMir package in your browser

Any scripts or data that you put into this service are public.

SubpathwayGMir documentation built on May 2, 2019, 2:39 a.m.