parse_IDs: parse_IDs: converts a vector of sample IDS into a matrix of...

Description Usage Arguments Examples

View source: R/mfafunctions96.R

Description

parse_IDs: converts a vector of sample IDS into a matrix of factors for each respective ID.

Usage

1
parse_IDs(id, sep = "_")

Arguments

id:

A vector containing character strings of sample IDs with each factor separated by a character. sep The character separating factors within the sample ID. Default sep = "_".

Examples

1
2
3
4
5
6
7
8
sampleID = c("DGRP_0120_MUSH",
             "DGRP_5430_BLIP")
factors = parse_IDs(sampleID)
print(factors)

Output:
     [,1]                [,2]    [,3]    [,4]
[1,] "DGRP_0120_M_MUSH", "DGRP", "0120", "MUSH"

jwalte5/mfa96 documentation built on April 10, 2021, 4:36 p.m.