Skip to content

Commit 3b6cd7c

Browse files
committed
examples running out of CRAN
1 parent 049e6de commit 3b6cd7c

23 files changed

+48
-32
lines changed

R/aggregate_climate.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#' @param frequency character with the aggregation frequency: (\code{"day"},
1313
#' \code{"month"} or \code{"year"}).
1414
#'
15-
#' @examples
15+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
1616
#' \donttest{
1717
#' lat <- c(4.172817, 4.172817, 4.136050, 4.136050, 4.172817)
1818
#' lon <- c(-74.749121, -74.686169, -74.686169, -74.749121, -74.749121)

R/divipola.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' codification includes individual codes for each department and municipality
66
#' following the political and administrative division.
77
#'
8-
#' @examples
8+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
99
#' divipola <- divipola_table()
1010
#'
1111
#' @return \code{data.frame} object with DIVIPOLA table.
@@ -24,7 +24,7 @@ divipola_table <- function() {
2424
#'
2525
#' @param department_name character vector with the names of the departments.
2626
#'
27-
#' @examples
27+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
2828
#' dptos <- c("Tolima", "Huila", "Amazonas")
2929
#' name_to_code_dep(dptos)
3030
#'
@@ -78,7 +78,7 @@ name_to_code_dep <- function(department_name) {
7878
#' @param municipality_name character vector with the names of the
7979
#' municipalities.
8080
#'
81-
#' @examples
81+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
8282
#' dptos <- c("Huila", "Antioquia")
8383
#' mpios <- c("Pitalito", "Turbo")
8484
#' name_to_code_mun(dptos, mpios)
@@ -179,7 +179,7 @@ retrieve_code <- function(input_token, fixed_tokens, codes_list) {
179179
#' @param department_code character vector with the DIVIPOLA codes of the
180180
#' departments.
181181
#'
182-
#' @examples
182+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
183183
#' dptos <- c("73", "05", "11")
184184
#' code_to_name_dep(dptos)
185185
#'
@@ -213,7 +213,7 @@ code_to_name_dep <- function(department_code) {
213213
#' @param municipality_code character vector with the DIVIPOLA codes of the
214214
#' municipalities.
215215
#'
216-
#' @examples
216+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
217217
#' mpios <- c("73001", "11001", "05615")
218218
#' code_to_name_mun(mpios)
219219
#'
@@ -244,7 +244,7 @@ code_to_name_mun <- function(municipality_code) {
244244
#'
245245
#' @param department_name character vector with the names to be translated.
246246
#'
247-
#' @examples
247+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
248248
#' dptos <- c("Bogota DC", "San Andres")
249249
#' name_to_standard_dep(dptos)
250250
#'
@@ -268,7 +268,7 @@ name_to_standard_dep <- function(department_name) {
268268
#' departments containing the municipalities.
269269
#' @param municipality_name character vector with the names to be translated.
270270
#'
271-
#' @examples
271+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
272272
#' dptos <- c("Bogota", "Tolima")
273273
#' mpios <- c("Bogota DC", "CarmendeApicala")
274274
#' name_to_standard_mun(dptos, mpios)

R/download_climate.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#' @param tag character containing climate tag to consult. Please use
1515
#' \code{cliamte_tags()} to check IDEAM tags.
1616
#'
17-
#' @examples
17+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
1818
#' \donttest{
1919
#' ptpm <- download_climate("73148", "2021-11-14", "2021-11-20", "PTPM_CON")
2020
#' head(ptpm)
@@ -72,7 +72,7 @@ download_climate <- function(code, start_date, end_date, tag) {
7272
#' \code{"YYYY-MM-DD"}. (Last available date is \code{"2023-05-31"}).
7373
#' @param tag character containing climate tag to consult.
7474
#'
75-
#' @examples
75+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
7676
#' \donttest{
7777
#' lat <- c(4.172817, 4.172817, 4.136050, 4.136050, 4.172817)
7878
#' lon <- c(-74.749121, -74.686169, -74.686169, -74.749121, -74.749121)
@@ -119,7 +119,7 @@ download_climate_geom <- function(geometry, start_date, end_date, tag) {
119119
#' @importFrom magrittr %>%
120120
#' @importFrom rlang .data
121121
#'
122-
#' @examples
122+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
123123
#' \donttest{
124124
#' lat <- c(4.172817, 4.172817, 4.136050, 4.136050, 4.172817)
125125
#' lon <- c(-74.749121, -74.686169, -74.686169, -74.749121, -74.749121)
@@ -213,7 +213,7 @@ download_climate_stations <- function(stations, start_date, end_date, tag) {
213213
#' @param geometry \code{sf} object containing the geometry for a given ROI.
214214
#' The geometry can be either a \code{POLYGON} or \code{MULTIPOLYGON}.
215215
#'
216-
#' @examples
216+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
217217
#' \donttest{
218218
#' lat <- c(5.166278, 5.166278, 4.982247, 4.982247, 5.166278)
219219
#' lon <- c(-75.678072, -75.327859, -75.327859, -75.678072, -75.678072)

R/download_demographic.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#' \code{list_datasets("demographic", "EN")} or
99
#' \code{list_datasets("demographic", "ES")} to check available datasets.
1010
#'
11-
#' @examples
11+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
1212
#' house_under_15 <- download_demographic("DANE_CNPVH_2018_1HD")
1313
#' head(house_under_15)
1414
#'

R/download_geospatial.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#' @param include_cnpv logical for including (or not) CNPV demographic and
3030
#' socioeconomic information. Default is \code{TRUE}.
3131
#'
32-
#' @examples
32+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
3333
#' \donttest{
3434
#' departments <- download_geospatial("department")
3535
#' head(departments)

R/download_population_projections.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#' @param include_ethnic logical for including (or not) division by ethnic
2424
#' group (only available for \code{"municipality"}). Default is \code{FALSE}.
2525
#'
26-
#' @examples
26+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
2727
#' pop_proj <- download_pop_projections("national", 2020, 2030)
2828
#' head(pop_proj)
2929
#'

R/merge_geo_demographic.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#' lighter but less precise, and are recommended for easier applications like
1616
#' plots. Default is \code{TRUE}.
1717
#'
18-
#' @examples
18+
#' @examplesIf identical(tolower(Sys.getenv("NOT_CRAN")), "true")
1919
#' \donttest{
2020
#' merged <- merge_geo_demographic("DANE_CNPVV_2018_9VD", TRUE)
2121
#' head(merged)

man/aggregate_climate.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/code_to_name_dep.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/code_to_name_mun.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)