sortInner: sortInner

Description Usage Arguments Value Author(s) Examples

View source: R/scsR_utils.R

Description

sorts an inner field (e.g. the scores of the oligos of a gene), keeping unaltered the order of the outer field (e.g. the genes)

Usage

1
sortInner(df, baseColStr, sortColStr, reverse = FALSE)

Arguments

df

input data frame.

baseColStr

name of the column that represents the outer field (e.g. the genes) (character vector)

sortColStr

name of the column that represents the inner field (e.g. the scores of the oligos of a gene) (character vector)

reverse

specify the direction of the sorting (boolean)

Value

data frame with sorted rows.

Author(s)

Andrea Franceschini

Examples

1
2
3
4
5
6
	data(uuk_screen)

	# to speed up the example we use only the first 1000 rows
	uuk_screen_reduced = uuk_screen[1:1000,]

	uuk_screen_innerSorted <- sortInner(uuk_screen_reduced, "GeneID", "score")

scsR documentation built on April 28, 2020, 7:11 p.m.