plot_data {autonomics}R Documentation

Plot data

Description

Plot data

Usage

plot_data(
  data,
  geom = geom_point,
  color = NULL,
  fill = !!enquo(color),
  ...,
  fixed = list(),
  theme = list()
)

Arguments

data

data.frame'

geom

geom_point, etc.

color

variable mapped to color (symbol)

fill

variable mapped to fill (symbol)

...

mapped aesthetics

fixed

fixed aesthetics (list)

theme

list with ggplot theme specifications

Value

ggplot object

Author(s)

Aditya Bhagwat, Johannes Graumann

Examples

require(magrittr)
file <- download_data('halama18.metabolon.xlsx')
object <- read_metabolon(file, plot = FALSE)
object %<>% pca()
data <- sdata(object)
plot_data(data, x = pca1, y = pca2)
plot_data(data, x = pca1, y = pca2, color = TIME_POINT)
data$TIME <- as.numeric(substr(data$TIME_POINT, 2, 3))
plot_data(data, x = pca1, y = pca2, color = TIME)
plot_data(data, x = pca1, y = pca2, color = NULL)

fixed <- list(shape = 15, size = 3)
plot_data(data, x = pca1, y = pca2, fixed=fixed)

[Package autonomics version 1.1.7 Index]