fDataToUnknown: Update a feature variable

Description Usage Arguments Value Author(s) Examples

View source: R/utils.R

Description

This function replaces a string or regular expression in a feature variable using the sub function.

Usage

1
2
fDataToUnknown(object, fcol = "markers", from = "^$", to = "unknown",
  ...)

Arguments

object

An instance of class MSnSet.

fcol

Feature variable to be modified. Default is "markers". If NULL, all feature variables will updated.

from

A character defining the string or regular expression of the pattern to be replaced. Default is the empty string, i.e. the regular expression "^$". See sub for details. If NA, then NA values are replaced by to.

to

A replacement for matched pattern. Default is "unknown". See sub for details.

...

Additional arguments passed to sub.

Value

An updated MSnSet.

Author(s)

Laurent Gatto

Examples

1
2
3
4
5
6
library("pRolocdata")
data(dunkley2006)
getMarkers(dunkley2006, "markers")
dunkley2006 <- fDataToUnknown(dunkley2006,
                              from = "unknown", to = "unassigned")
getMarkers(dunkley2006, "markers")

pRoloc documentation built on Nov. 8, 2020, 6:26 p.m.