vsg_split_mdt: Splits a samplename column into three columns, mouse, day,...

View source: R/vsg_split_mdt.R

vsg_split_mdtR Documentation

Splits a samplename column into three columns, mouse, day, and tissue (mdt).

Description

I kept having to do this so I made a function to split my usualy samplename nomenclature into the designated mouse, day, adn tissue columns (mdt).

Usage

vsg_split_mdt(df, col_to_split, by = "_", convert = TRUE)

Arguments

df

A data frame, usually containing VSGSeq results data.

col_to_split

The column to split, usually a samplename column.

by

The character to split by. The default is an underscore ("_").

convert

If TRUE, will run type.convert() with as.is = TRUE on new columns. This is useful if the component columns are integer, numeric or logical.

Value

Returns a date frame with the designate column split into mouse, day, and tissue columns.

Examples

vsg_split_mdt("samplename")

ABeav/vsgseqtools documentation built on Jan. 26, 2024, 7:22 p.m.