fr_append_cols: Append data columns to a flowFrame

Description Usage Arguments Details Value Author(s) Examples

View source: R/flowFrame-accessors.R

Description

Append data columns to a flowFrame

Usage

1
fr_append_cols(fr, cols)

Arguments

fr

A flowFrame.

cols

A numeric matrix containing the new data columns to be added. Must have unique column names to be used as new channel names.

Details

It is used to add extra data columns to the existing flowFrame. It handles keywords and parameters properly to ensure the new flowFrame can be written as a valid FCS through the function write.FCS .

Value

A flowFrame

Author(s)

Mike Jiang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  data(GvHD)
  tmp <- GvHD[[1]]
  
  kf <- kmeansFilter("FSC-H"=c("Pop1","Pop2","Pop3"), filterId="myKmFilter")
  fres <- filter(tmp, kf)
  cols <- as.integer(fres@subSet)
  cols <- matrix(cols, dimnames = list(NULL, "km"))
  tmp <- fr_append_cols(tmp, cols)
  
  tmpfile <- tempfile()
  write.FCS(tmp, tmpfile) 

flowCore documentation built on Nov. 8, 2020, 5:19 p.m.