exportImage {RCy3} | R Documentation

## Export Image

### Description

Saves the current network view as an image file.

### Usage

    exportImage(
      filename = NULL,
      type = "PNG",
      resolution = NULL,
      units = NULL,
      height = NULL,
      width = NULL,
      zoom = NULL,
      network = NULL,
      base.url = .defaultBaseUrl,
      overwriteFile = TRUE
    )

### Arguments

`filename` | (`character`) Full path or path relavtive to current working directory, in addition to the name of the file. Extension is automatically added based on the `type` argument. If blank, the current network name will be used.
`type` | (`character`) Type of image to export, e.g., PNG (default), JPEG, PDF, SVG, PS (PostScript).
`resolution` | (`numeric`) The resolution of the exported image, in DPI. Valid only for bitmap formats, when the selected width and height 'units' is inches. The possible values are: 72 (default), 100, 150, 300, 600.
`units` | (`character`) The units for the 'width' and 'height' values. Valid only for bitmap formats, such as PNG and JPEG. The possible values are: pixels (default), inches.
`height` | (`numeric`) The height of the exported image. Valid only for bitmap formats, such as PNG and JPEG.
`width` | (`numeric`) The width of the exported image. Valid only for bitmap formats, such as PNG and JPEG.
`zoom` | (`numeric`) The zoom value to proportionally scale the image. The default value is 100.0. Valid only for bitmap formats, such as PNG and JPEG
`network` | (optional) Name or SUID of a network or view. Default is the "current" network active in Cytoscape. The first (presummably only) view associated a network is used if a specific view SUID is not provided.
`base.url` | (optional) Ignore unless you need to specify a custom domain, port or version to connect to the CyREST API. Default is http://localhost:1234 and the latest version of the CyREST API supported by this version of RCy3.
`overwriteFile` | (optional) FALSE allows Cytoscape show a message box before overwriting the file if the file already exists; TRUE allows Cytoscape to overwrite it without asking. Default value is TRUE.

### Details

The image is cropped per the current view in Cytoscape. Consider applying `fitContent` prior to export.

### Value

server response

### Examples

    exportImage('/fullpath/myNetwork','PDF')

[Package RCy3 version 2.12.4 Index]