Learn R Programming

grandR (version 0.2.6)

Slots: Slot functions

Description

Get slot names and add or remove slots

Usage

Slots(data)

DropSlot(data, pattern = NULL)

AddSlot(data, name, matrix, set.to.default = FALSE, warn = TRUE)

Value

Either the slot names or a grandR data with added/removed slots

Arguments

data

A grandR object

pattern

a regular expression matched against slot names

name

the slot name

matrix

the data matrix for the new slot

set.to.default

set the new slot as the default slot?

warn

issue a warning if the slot name already exists and is overwritten

Functions

  • Slots(): Obtain the slot names

  • DropSlot(): Remove one or several slots from this grandR object

  • AddSlot(): Add an additional slot to this grandR object

See Also

DefaultSlot

Examples

Run this code
sars <- ReadGRAND(system.file("extdata", "sars.tsv.gz", package = "grandR"),
                  design=c("Cell",Design$dur.4sU,Design$Replicate))

sars <- Normalize(sars)     # default behavior is to update the default slot
sars
sars <- DropSlot(sars,"norm")
sars                        # note that the defauls slot reverted to count

Run the code above in your browser using DataLab