extract_snp: Extract SNPs from abstracts in data frame

Description Usage Arguments Details Value See Also

View source: R/polymorphism.R

Description

Extract SNPs from abstracts in a data frame.

Usage

1
2
3
4
5
6
7
extract_snp(
  df,
  pattern = snp_pattern,
  col.abstract = Abstract,
  indicate = FALSE,
  discard = FALSE
)

Arguments

df

Data frame containing abstracts.

pattern

String. Regex pattern to identify SNPs.

col.abstract

Symbol. Column containing abstracts.

indicate

Boolean. If indicate = TRUE, add another column called "SNP_present", verbally indicating if a SNP is present in an abstract.

discard

Boolean. If discard = TRUE, only abstracts containing a SNP are kept.

Details

Extract SNPs from abstracts in a data frame. SNPs are added to the data frame in a separate column. Furthermore, an optional column can indicate if SNPs are generally present in an abstract.

Value

Data frame. If discard = FALSE, return the data frame with an additional column for SNPs. If discard = TRUE, return only abstracts containing SNPs.

See Also

count_snp(), get_snp(), subset_snp()

Other extract functions: extract_mir_df(), extract_mir_string()


JulFriedrich/miRetrieve documentation built on Sept. 20, 2021, 11:37 p.m.