Extract SNPs from abstracts in a data frame.
extract_snp(
df,
pattern = snp_pattern,
col.abstract = Abstract,
indicate = FALSE,
discard = FALSE
)
Data frame containing abstracts.
String. Regex pattern to identify SNPs.
Symbol. Column containing abstracts.
Boolean. If indicate = TRUE
, add another column called
"SNP_present", verbally indicating if a SNP is present in an abstract.
Boolean. If discard = TRUE
, only abstracts containing a
SNP are kept.
Data frame. If discard = FALSE
, return the data frame with
an additional column for SNPs.
If discard = TRUE
, return only abstracts containing SNPs.
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.
count_snp()
,
get_snp()
,
subset_snp()
Other extract functions:
extract_mir_df()
,
extract_mir_string()