count_in: Count/Collapse in/outside intersection

count_inR Documentation

Count/Collapse in/outside intersection

Description

Count/Collapse in/outside intersection

Usage

count_in(x, ...)

## S3 method for class 'character'
count_in(x, y, ...)

## S3 method for class 'factor'
count_in(x, y, ...)

## S3 method for class 'list'
count_in(x, y, ...)

collapse_in(x, ...)

## S3 method for class 'character'
collapse_in(x, y, sep, ...)

## S3 method for class 'factor'
collapse_in(x, y, sep, ...)

## S3 method for class 'list'
collapse_in(x, y, sep, ...)

count_out(x, ...)

## S3 method for class 'character'
count_out(x, y, ...)

## S3 method for class 'factor'
count_out(x, y, ...)

## S3 method for class 'list'
count_out(x, y, ...)

Arguments

x

character OR list

...

used for S3 dispatch

y

character

sep

string

Value

number OR numeric

Examples

# Sets
   contrast1 <- c('a', 'b', 'c', 'd')
     pathway <- c('c', 'd', 'e', 'f')
   contrast2 <- c('e', 'f', 'g', 'h')

# Count outside
   count_out(contrast1, pathway)
   count_out(list(contrast1 = contrast1, contrast2 = contrast2), pathway)

# Count inside
   count_in(contrast1, pathway)
   count_in(list(contrast1 = contrast1, contrast2 = contrast2), pathway)

# Collapse inside
   collapse_in(contrast1, pathway, sep = ' ')
   collapse_in(list(contrast1 = contrast1, contrast2 = contrast2), pathway, sep = ' ')

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