reorder_data: Reorder fragments names represented as factor levels based on...

Description Usage Arguments Details Value Examples

View source: R/functions.R

Description

Reorder fragments names represented as factor levels based on a specified metric

Usage

1
reorder_data(df, by_model, by_prop, FUN = median, frag_col_name = "full_name")

Arguments

df

input data.frame.

by_model

character name of a selected model name in column

by_prop

character name of a selected property

FUN

metric functions applied to order different fragments

frag_col_name

character name of column containing desired fragments names to reorder

Details

This function can be applied only to the melted input data.frame.

Value

data.frame.

Examples

1
2
3
file_name <- system.file("extdata", "free-wilson_frag_contributions.txt", package = "rspci")
df <- load_data(file_name)
df <- reorder_data(df, "consensus", "overall", frag_col_name = "FragID")

DrrDom/rspci documentation built on April 27, 2021, 4:26 a.m.