labguru_upload_file: Labguru upload file

View source: R/upload_file.R

labguru_upload_fileR Documentation

Labguru upload file

Description

Upload a file to Labguru

Usage

labguru_upload_file(
  file,
  title,
  description = NULL,
  server = Sys.getenv("LABGURU_SERVER"),
  token = Sys.getenv("LABGURU_TOKEN")
)

Arguments

file

character(1) that is the path to a file

title

character(1) as visualization title on Labguru

description

character(1) to describe visualization on Labguru

server

character(1) indicating the server URL

token

character(1) access token for API authentication

attach_to_uuid

(optional) character(1) that is the LG_UUID of the object to which this file should be attached

Value

list containing uploaded id and url

Examples

## Not run: 
data("compensation")

library(ggplot2)
plot <- ggplot(compensation,aes(x = Root, y = Fruit, colour = Grazing)) +
  geom_point(size = 5) +
  xlab("Root Biomass") +
  ylab("Fruit Production") +
  theme_bw()

ggsave("grazing.png", plot)

labguru_upload_image(file_path   = "grazing.png",
                     name        = "Grazing",
                     description = "Fruit production versus Root biomass for grazed and ungrazed")

## End(Not run)

BioData/LabguruR documentation built on May 11, 2022, 11:46 p.m.