vsg_expand: Creates all possible combinations of sample ~ VSG (col1 ~...

View source: R/vsg_expand.R

vsg_expandR Documentation

Creates all possible combinations of sample ~ VSG (col1 ~ col2).

Description

This takes a VSG seq output data frame and expands it to include all possible combinations of sample ~ VSG (col1 ~ col2). Then resets all Percent values to be zero if a VSG was not found in a sample.

Usage

vsg_expand(df, col1, col2, merge = TRUE)

Arguments

df

A data frame, usually containing VSGSeq results data.

col1

The first column to expand on, this is typically the samplename column. (Needs to be in quotes)

col2

The second column to expand with, this is typically the VSG column with the name of each VSG.

merge

A logical argument to merge back with the original data to get percent info in the output.

Value

Returns a date frame with the VSG data for every possible combination of sample ~ VSG (col1 ~ col2)

Examples

vsg_expand(results_df, "samplename", "VSG")

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