tidycode (version 0.1.0)

get_classifications: Get a tidy data frame of classifications of all functions used in your analysis

Description

Get a tidy data frame of classifications of all functions used in your analysis

Usage

get_classifications(lexicon = NULL, include_duplicates = TRUE)

Arguments

lexicon

Character. The classification lexicon to retrieve. Either "crowdsource" or "leeklab". If NULL (default), will return all lexicons.

include_duplicates

Logical. Indicates whether to include all functions and classifications along with their score (default, TRUE) - this may result in multiple lines (with multiple classifications) for a single function. If FALSE, the most prevalent classification will be selected.

Value

A tbl_df with columns:

  • func: the function

  • classification: the classification

If include_duplicates = TRUE, will include a column:

  • score: the score

If lexicon is NULL, will include a column:

  • lexicon: the classification lexicon

Examples

Run this code
# NOT RUN {
# Get a data frame of all classifications
get_classifications()

# Get a data frame of the most prevalent classifications
get_classifications(include_duplicates = FALSE)

# Get a data frame of only `leeklab` classifications
get_classifications("leeklab")

# }

Run the code above in your browser using DataLab