Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

xgx_save_table

Saving table as an image, also labeling the program that created the table and where the table is stored


Description

Saving table as an image, also labeling the program that created the table and where the table is stored

Usage

xgx_save_table(data, dirs = NULL, filename_main = NULL)

Arguments

data

data.frame or table of results

dirs

list of directories. If NULL or if directories missing, there is default behavior below

  1. parent_dir = Parent directory containing the Rscript and the Results folder, default getwd()

  2. rscript_dir = Subdirectory of parent_dir that contains the Rscript used to generate the figure, default "./"

  3. rscript_name= Name of the Rscript used to generate the figure, default "Name_Of_Script_Here.R"

  4. results_dir = Subdirectory ofparent_dir where the figure is stored, default "./"

  5. filename_prefix = prefix of filename to be appended to filename_main

filename_main

main part of the filename, excluding prefix and extension. no default

Value

ggplot2 plot object

Examples

directory = tempdir()
dirs <- list(parent_dir  = directory,
             rscript_dir = directory,
             rscript_name = "example.R",
             results_dir = directory,
             filename_prefix = "example_")
data <- data.frame(x = c(1, 2), y = c(1, 2))
xgx_save_table(data, dirs = dirs, filename_main = "test")

xgxr

Exploratory Graphics for Pharmacometrics

v1.1.1
MIT + file LICENSE
Authors
Andrew Stein [aut, cre], Alison Margolskee [aut], Fariba Khanshan [aut], Konstantin Krismer [aut] (<https://orcid.org/0000-0001-8994-3416>), Matthew Fidler [ctb] (<https://orcid.org/0000-0001-8538-6691>), Novartis Pharma AG [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.