R/applyLayout.R

Defines functions applyLayout

Documented in applyLayout

#' Apply a layout to the current network
#'
#' @param layout (char) name of the layut, run commandHelp('layout') to see available list of layouts.
#' Feel free to include parameters along with the layout name, space delimited. See example.
#' @param base.url cyrest base url for communicating with cytoscape
#' @return server response
#' @export
#' @examples
#' \donttest{
#' applyLayout('force-directed defaultSpringCoefficient=.000004 defaultSpringLength=100')
#' }

applyLayout<-function(layout,base.url='http://localhost:1234/v1'){
    res<-commandRun(paste('layout',layout,'network="current"',sep=' '))
    if(length(res)>0) #show error messages
        return(res)
}
cytoscape/r2cytoscape documentation built on May 4, 2019, 6:36 p.m.