Skip to content

Commit

Permalink
GH-38228: [R] Fence examples that need dataset with examplesIf (#38229
Browse files Browse the repository at this point in the history
)

### Rationale for this change

The minimal nightly build are failing with examples that won't run without the dataset feature

### What changes are included in this PR?

- Added `examplesIf` where needed
- Redocumented

### Are these changes tested?

Yes, by all R CMD check jobs

### Are there any user-facing changes?

No
* Closes: #38228

Authored-by: Dewey Dunnington <[email protected]>
Signed-off-by: Dewey Dunnington <[email protected]>
  • Loading branch information
paleolimbot authored Oct 12, 2023
1 parent cc1dc6a commit 84a4ab1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions r/R/csv.R
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ CsvTableReader$create <- function(file,
#' - column names are read (unless `column_names` is set);
#' - `skip_rows_after_names` is applied (if non-zero).
#'
#' @examples
#' @examplesIf arrow_with_dataset()
#' tf <- tempfile()
#' on.exit(unlink(tf))
#' writeLines("my file has a non-data header\nx\n1\n2", tf)
Expand Down Expand Up @@ -672,7 +672,7 @@ readr_to_csv_read_options <- function(skip = 0, col_names = TRUE) {
#' and LF (`0x0a`) characters?
#' @param ignore_empty_lines Logical: should empty lines be ignored (default) or
#' generate a row of missing values (if `FALSE`)?
#' @examples
#' @examplesIf arrow_with_dataset()
#' tf <- tempfile()
#' on.exit(unlink(tf))
#' writeLines("x\n1\n\n2", tf)
Expand Down Expand Up @@ -780,7 +780,7 @@ TimestampParser$create <- function(format = NULL) {
#' (c) a list of [TimestampParser] objects.
#' @param decimal_point Character to use for decimal point in floating point numbers.
#'
#' @examples
#' @examplesIf arrow_with_dataset()
#' tf <- tempfile()
#' on.exit(unlink(tf))
#' writeLines("x\n1\nNULL\n2\nNA", tf)
Expand Down
1 change: 1 addition & 0 deletions r/man/arrow-package.Rd

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

2 changes: 2 additions & 0 deletions r/man/csv_convert_options.Rd

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

2 changes: 2 additions & 0 deletions r/man/csv_parse_options.Rd

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

2 changes: 2 additions & 0 deletions r/man/csv_read_options.Rd

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

0 comments on commit 84a4ab1

Please sign in to comment.