This function adds new data to sampleColData in an ArchRProject.

addSampleColData(
  ArchRProj = NULL,
  data = NULL,
  name = NULL,
  samples = NULL,
  force = FALSE
)

Arguments

ArchRProj

An ArchRProject object.

data

A vector containing the data to be added to sampleColData.

name

The column header name to be used for this new data in sampleColData. If a column with this name already exists, you may set force equal to TRUE to overwrite the data in this column.

samples

The names of the samples corresponding to data. Typically new data is added to all samples but you may use this argument to only add data to a subset of samples. Samples where data is not added are set to NA.

force

A boolean value that indicates whether or not to overwrite data in a given column when the value passed to name already exists as a column name in sampleColData.

Examples


# Get Test ArchR Project
proj <- getTestProject()

# Add Sample Column Data
addSampleColData(proj, data = 1, name = "Test", samples = "PBSmall")