Skip to content

Commit aceaeff

Browse files
committed
use interactive()
1 parent f1865ab commit aceaeff

File tree

5 files changed

+26
-20
lines changed

5 files changed

+26
-20
lines changed

NEWS.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# pmlbr 0.2.2
22
* File download fail gracefully if no internet connection is available
33

4-
# pmlbr 0.2.1
5-
64
# pmlbr 0.2.1
75
* Added -package alias
86

R/nearest.R

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
#' @export
2323
#'
2424
#' @examples
25-
#' nearest_datasets('penguins')
26-
#' nearest_datasets(fetch_data('penguins'))
27-
#'
25+
#' if (interactive()){
26+
#' nearest_datasets('penguins')
27+
#' nearest_datasets(fetch_data('penguins'))
28+
#' }
2829
nearest_datasets <- function(x, ...){
2930
UseMethod('nearest_datasets', x)
3031
}

R/pmlb.R

+9-6
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@
1313
#' @export
1414
#' @examples
1515
#' # Features and labels in single data frame
16-
#' penguins <- fetch_data("penguins")
17-
#' head(penguins)
16+
#' if (interactive()){
17+
#' penguins <- fetch_data("penguins")
18+
#' head(penguins)
19+
#'
20+
#' # Features and labels stored in separate data structures
21+
#' penguins <- fetch_data("penguins", return_X_y = TRUE)
22+
#' penguins$x # data frame
23+
#' penguins$y # vector
24+
#' }
1825
#'
19-
#' # Features and labels stored in separate data structures
20-
#' penguins <- fetch_data("penguins", return_X_y = TRUE)
21-
#' penguins$x # data frame
22-
#' penguins$y # vector
2326
fetch_data <- function(dataset_name, return_X_y = FALSE, local_cache_dir = NA, dropna = TRUE) {
2427
GITHUB_URL <- "https://github.com/EpistasisLab/pmlb/raw/master/datasets"
2528
SUFFIX <- ".tsv.gz"

man/fetch_data.Rd

+9-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/nearest_datasets-methods.Rd

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)