remove_entries {canprot}R Documentation

Remove Data Entries

Description

Remove rows of a data table matching a condition, and print an informative message.

Usage

  remove_entries(dat, irm, dataset, description) 

Arguments

dat

data frame

irm

logical, which rows to remove

dataset

character, name of dataset used in message

description

character, description used in message

Details

This function is used by the pdat_ functions to “clean up” particular datasets. Examples of the description in pdat_CRC are missing, conflicting, and duplicated. This function is made accessible to the user who may wish to write their own pdat_ functions.

Examples

extdatadir <- paste0(system.file("extdata", package="canprot"), "/")
dataset <- "STK+15"
# an excerpt from pdat_CRC() for dataset="STK+15"
dat <- read.csv(paste0(extdatadir, "STK+15.csv"), as.is=TRUE)
dat <- remove_entries(dat, is.na(dat$uniprot), dataset, "missing")
# the above prints "STK+15: dropping 3 missing proteins"

[Package canprot version 0.0.2 Index]