makeSampleData: Make sample data

makeSampleDataR Documentation

Make sample data

Description

Make sample data

Usage

makeSampleData(object, ...)

## S4 method for signature 'DFrame'
makeSampleData(object)

## S4 method for signature 'data.frame'
makeSampleData(object)

Arguments

object

Object.

...

Additional arguments.

Value

DataFrame.

Note

Updated 2021-02-25.

Utility function that prepares metadata to be slotted into colData().

This function adheres to the following conventions:

  • Row names are required. Either define manually (recommended) or pass in as a rownames column (data.table / tibble style). Supported colnames: "sampleId", "rowname", "rn".

  • All column names will be converted to lower camel case (see camelCase() for details).

  • sampleName column is always placed first.

Required columns:

  • sampleName: Human readable sample names. Note that this column is useful for plots and doesn't have to match the column names of a SummarizedExperiment object, which should use valid names.

Denylist columns:

  • filename (use fileName).

  • id.

  • interestingGroups. Defined automatically downstream.

  • sample. Too vague. Does this represent an ID or human readable name?

  • samplename (use sampleName).

See Also

makeNames.

Examples

## DFrame ====
object <- S4Vectors::DataFrame(
    "genotype" = rep(c("control", "wildtype"), times = 2L),
    "treatment" = rep(c("vector", "RNAi"), each = 2L),
    "sampleName" = paste("sample", seq_len(4L)),
    row.names = paste0("GSM000000", seq_len(4L))
)
makeSampleData(object)

acidgenomics/r-acidexperiment documentation built on Jan. 17, 2024, 7:56 p.m.