addSampleManually: Add sample manually

View source: R/addSampleManually.R

addSampleManuallyR Documentation

Add sample manually

Description

Adds a new sample to the source data.frame.

Usage

addSampleManually(
  source_df = sourceDataFrame(),
  new_sample_input,
  update,
  in_shiny = FALSE
)

Arguments

source_df

The source data.frame. Defaults to the current source_df of the package.

new_sample_input

A named list. Each slot corresponds to a variable of the source_df and should be named accordingly. Apart from the variable sample_name missing variables are allowed (not recommended though) and will result in NA for the respective slot. See details for more information.

update

Logical. Use with caution! If TRUE, the updated output data.frame will replace the current source_df of the package!

Details

Slots must be named as unnamed slots are discarded! Content of slot sample_name must not be among the samples names. Slot tags can be a character vector of length > 1. Every other slot should be a single value. Apart from slot stage, which should be an integer, these are always character values.

Value

The updated data.frame is returned invisibly.


theMILOlab/SPATAData documentation built on Aug. 27, 2024, 5:04 p.m.