split_df: split_df

Description Usage Arguments Value Author(s) Examples

View source: R/scsR_utils.R

Description

You can use this function to extract only certain rows from the data frame. Give a value in the strIdCol, we include in the output data frame only the rows specified in the linesToGet vector (e.g. for every gene extract only the first two oligos)

Usage

1
split_df(df, strIdCol, linesToGet)

Arguments

df

input data frame

strIdCol

name of the column containing the identifiers of the groups (character vector)

linesToGet

vector containing the numbers of the lines to retrieve (vector)

Value

subset of the input data frame (only the rows requested are included in the subset)

Author(s)

Andrea Franceschini

Examples

1
2
3
4
5
6
7
	data(uuk_screen)

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


	uuk_screen_firstOligo <- split_df(uuk_screen_reduced, "GeneID", c(1))

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