Learn R Programming

scsR (version 1.8.0)

split_df: split_df

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

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)

Examples

Run this code
	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))

Run the code above in your browser using DataLab