bin: Bin continuous variable

View source: R/8_plot_volcano.R

binR Documentation

Bin continuous variable

Description

Bin continuous variable

Usage

bin(object, ...)

## S3 method for class 'logical'
bin(object, ...)

## S3 method for class 'character'
bin(object, ...)

## S3 method for class 'factor'
bin(object, ...)

## S3 method for class 'numeric'
bin(object, probs = c(0, 0.33, 0.66, 1), ...)

## S3 method for class 'SummarizedExperiment'
bin(object, fvar, probs = c(0, 0.33, 0.66, 1), ...)

Arguments

object

numeric or SummarizedExperiment

...

(S3 dispatch)

probs

numeric

fvar

string or NULL

Value

factor vector

Examples

# Numeric vector
    object <- rnorm(10, 5, 1)
    bin(object)
# SummarizedExperiment
    file <- system.file('extdata/fukuda20.proteingroups.txt', package = 'autonomics')
    fdt(object <- read_maxquant_proteingroups(file))
    fdt(bin(object, 'pepcounts'))

bhagwataditya/importomics documentation built on Oct. 29, 2024, 3:19 p.m.