split_df {scsR} | R Documentation |
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)
split_df(df, strIdCol, linesToGet)
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) |
subset of the input data frame (only the rows requested are included in the subset)
Andrea Franceschini
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))