Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated has_examples documentation to better reflect what is being as… #353

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions R/assess_has_examples.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ assess_has_examples <- function(x, ...) {

# assign a friendly name for examples column
attributes(assess_has_examples)$column_name <- "has_examples"
attributes(assess_has_examples)$label <- "proportion of discovered function files with examples"
attributes(assess_has_examples)$label <- "logical vector of function files with examples"

#' @export
assess_has_examples.pkg_ref <- function(x, ...) {
Expand All @@ -22,10 +22,12 @@ assess_has_examples.pkg_ref <- function(x, ...) {

#' Score a package for the presence of a example or usage fields
#'
#' Coerce a logical vector indicating availability of example or usage documentation
#' Compute the proportion of function files with examples from the logical vector indicating availability of example or usage documentation
#'
#' @eval roxygen_score_family("has_examples")
#' @return \code{1} if any example or usage fields are found, otherwise \code{0}
#' @return numeric value between \code{1} (high proportion of functions with examples) and
#' \code{0} (no functions with examples)
#'
#' @export
metric_score.pkg_metric_has_examples <- function(x, ...) {
Expand Down
Loading