polar_grid {volcano3D}R Documentation

Grid required for 3D volcano plot and 2D radial plots

Description

Generates a cylindrical grid of the appropriate dimensions for a 3D volcano plot

Usage

polar_grid(
  r_vector = NULL,
  z_vector = NULL,
  r_axis_ticks = NULL,
  z_axis_ticks = NULL,
  axis_angle = 5/6,
  n_spokes = 12,
  axes_from_origin = TRUE,
  ...
)

Arguments

r_vector

An optional numerical vector for the radial coordinates. This is used to calculate breaks on the r axis using pretty. If this is NULL the r_axis_ticks are used as breaks.

z_vector

An optional numerical vector for the z coordinates. This is used to calculate breaks on the z axis using pretty. If this is NULL the z_axis_ticks are used as breaks.

r_axis_ticks

A numerical vector of breaks for the radial axis (used if r_vector is NULL).

z_axis_ticks

A numerical vector of breaks for the z axis (used if z_vector is NULL).

axis_angle

angle in radians to position the radial axis (default = 5/6)

n_spokes

the number of outward spokes to be plotted (default = 12)

axes_from_origin

Whether the axis should start at 0 or the first break (default = TRUE)

...

optional parameters for pretty on the r axis

Value

Returns an S4 grid object containing:

References

Lewis, Myles J., et al. (2019). Molecular portraits of early rheumatoid arthritis identify clinical and treatment response phenotypes. Cell reports, 28:9

Examples

data(example_data)
syn_polar <- polar_coords(outcome = syn_example_meta$Pathotype,
                          data = t(syn_example_rld))

grid <- polar_grid(r_vector=syn_polar@df[[1]]$r,
           z_vector=NULL,
           r_axis_ticks = NULL,
           z_axis_ticks = c(0, 8, 16, 32),
           n_spokes = 4)

[Package volcano3D version 2.0.9 Index]