Skip to content

Commit

Permalink
Correct some documentation (#769)
Browse files Browse the repository at this point in the history
* Correct some documentation

This resolves a build warning.

* Style code

---------

Co-authored-by: Moohan <[email protected]>
  • Loading branch information
Moohan and Moohan authored Aug 1, 2023
1 parent 965f05c commit d75922a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 37 deletions.
15 changes: 9 additions & 6 deletions R/aggregate_by_chi_zihao.R
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,13 @@ aggregate_by_chi_zihao <- function(episode_file) {
}


#' select columns ending with some patterns
#' @describeIn select columns based on patterns
#' Select columns according to a pattern
#'
#' @describeIn vars_select Choose variables ending in a given pattern.
#'
#' @param data The data from which to select columns/variables.
#' @param vars The variables / pattern to find, as a character vector
#' @param ignore_case Should case be ignored (Default: FALSE)
vars_end_with <- function(data, vars, ignore_case = FALSE) {
names(data)[stringr::str_ends(
names(data),
Expand All @@ -166,8 +171,7 @@ vars_end_with <- function(data, vars, ignore_case = FALSE) {
)]
}

#' select columns starting with some patterns
#' @describeIn select columns based on patterns
#' @describeIn vars_select Choose variables starting with a given pattern.
vars_start_with <- function(data, vars, ignore_case = FALSE) {
names(data)[stringr::str_starts(
names(data),
Expand All @@ -177,8 +181,7 @@ vars_start_with <- function(data, vars, ignore_case = FALSE) {
)]
}

#' select columns contains some characters
#' @describeIn select columns based on patterns
#' @describeIn vars_select Choose variables which contain a given pattern.
vars_contain <- function(data, vars, ignore_case = FALSE) {
names(data)[stringr::str_detect(
names(data),
Expand Down
2 changes: 1 addition & 1 deletion _targets.R
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ list(
data = individual_file,
year = year
)
)#,
) # ,
# tar_target(
# episode_file_dataset,
# arrow::write_dataset(
Expand Down
30 changes: 0 additions & 30 deletions man/select.Rd

This file was deleted.

33 changes: 33 additions & 0 deletions man/vars_select.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d75922a

Please sign in to comment.