split_df {scsR} | R Documentation

## 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)

### Author(s)

Andrea Franceschini

### Examples

    	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))

[Package scsR version 1.23.0 Index]