str2dig: String to Digits

str2digR Documentation

String to Digits

Description

A simple function to transform a string of digits into a numeric vector.

Usage

str2dig(x, split = "", ...)

## S4 method for signature 'character'
str2dig(x, split = "", ...)

## S4 method for signature 'list'
str2dig(x, split = "", num.cores = 1L, tasks = 0L, verbose = FALSE, ...)

Arguments

x

A character string or a list/ of character strings of numeric/digit symbols.

split

The same as in strsplit

...

Further parameters for strsplit.

num.cores, tasks

Parameters for parallel computation using package BiocParallel-package: the number of cores to use, i.e. at most how many child processes will be run simultaneously (see bplapply and the number of tasks per job (only for Linux OS).

verbose

If TRUE, prints the function log to stdout.

Value

A integer vector or a list of integer vectors.

Author(s)

Robersy Sanchez https://genomaths.com

Examples

## A integer vector
str2dig("12231456247")

## A list of integer vectors
str2dig(list(num1 = "12231456247", num2 = "521436897"))

genomaths/GenomAutomorphism documentation built on May 10, 2024, 12:11 a.m.