Skip to content

Commit

Permalink
updated has_examples documentation to better reflect what is being as…
Browse files Browse the repository at this point in the history
…sessed and scored
  • Loading branch information
emilliman5 committed Sep 17, 2024
1 parent 39489b2 commit 31d708e
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 31d708e

Please sign in to comment.