guess_sep: Guess separator

guess_sepR Documentation

Guess separator

Description

Guess separator

Usage

guess_sep(x, ...)

## S3 method for class 'numeric'
guess_sep(x, ...)

## S3 method for class 'character'
guess_sep(x, separators = c(".", "_"), verbose = FALSE, ...)

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

## S3 method for class 'SummarizedExperiment'
guess_sep(x, var = "sample_id", separators = c(".", "_"), verbose = FALSE, ...)

Arguments

x

character vector or SummarizedExperiment

...

used for proper S3 method dispatch

separators

character vector: possible separators to look for

verbose

TRUE or FALSE

var

svar or fvar

Value

separator (string) or NULL (if no separator could be identified)

Examples

# charactervector
   guess_sep(c('PERM_NON.R1[H/L]', 'PERM_NON.R2[H/L]'))
   guess_sep(c('WT_untreated_1', 'WT_untreated_2'))
   guess_sep(c('group1', 'group2.R1'))
# SummarizedExperiment
   file <- system.file('extdata/atkin.metabolon.xlsx', package = 'autonomics')
   object <- read_metabolon(file)
   guess_sep(object)

bhagwataditya/autonomics documentation built on Dec. 1, 2024, 12:27 a.m.