Skip to content

Commit

Permalink
replace RandomFields, fix #307, PR #314
Browse files Browse the repository at this point in the history
  • Loading branch information
DanWismer authored May 10, 2023
1 parent 2e115c0 commit 46a5e60
Show file tree
Hide file tree
Showing 42 changed files with 447 additions and 310 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/R-CMD-check-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }}) (${{ matrix.config.pkgs }} packages)
name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-20.04, r: '4.1.0', pkgs: 'all'}
- {os: ubuntu-20.04, r: '4.1.0', pkgs: 'depends only'}
- {os: ubuntu-20.04, r: '4.1.0'}

env:
_R_REMOTES_NO_ERRORS_FROM_WARNINGS_: true
Expand Down Expand Up @@ -65,11 +64,6 @@ jobs:
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Set environmental variables for package checks
if: matrix.config.pkgs == 'depends only'
run: |
echo "_R_CHECK_DEPENDS_ONLY_=true" >> $GITHUB_ENV
- name: Check
run: |
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--no-build-vignettes"), error_on = "warning", check_dir = "check")
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/R-CMD-check-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }}) (${{ matrix.config.pkgs }} packages)
name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: '4.1.0', pkgs: 'all'}
- {os: windows-latest, r: '4.1.0', pkgs: 'depends only'}
- {os: windows-latest, r: '4.1.0'}

env:
_R_REMOTES_NO_ERRORS_FROM_WARNINGS_: true
Expand Down Expand Up @@ -70,11 +69,6 @@ jobs:
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Set environmental variables for package checks
if: matrix.config.pkgs == 'depends only'
run: |
echo "_R_CHECK_DEPENDS_ONLY_=true" >> $GITHUB_ENV
- name: Check
run: |
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--no-build-vignettes", "--no-multiarch"), error_on = "warning", check_dir = "check")
Expand Down
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ Imports:
leaflet.extras2 (>= 1.1.0),
colourpicker (>= 1.1.0),
DT (>= 0.18),
fields (>= 0.14.1),
terra (>= 1.7.29),
Suggests:
testthat (>= 2.0.1),
knitr (>= 1.2.0),
Expand All @@ -78,13 +80,12 @@ Suggests:
devtools (>= 2.4.2),
whereami (>= 0.1.9),
pkgdown (>= 1.6.1.9001),
RandomFields (>= 3.3.8),
Depends:
R (>= 4.0.0),
shinyBS (>= 0.6.1),
promises (>= 1.2.0.1),
R6 (>= 2.5.0),
raster (>= 3.4.10),
raster (>= 3.6.20),
sf (>= 0.9.8),
License: GPL-3
Encoding: UTF-8
Expand Down Expand Up @@ -163,6 +164,7 @@ Collate:
'ui_newSolutionSidebarPane.R'
'ui_solutionResultsModal.R'
'ui_solutionResultsSidebarPane.R'
'utils-tidy-eval.R'
'utils_acknowledge_packages.R'
'utils_color_palette.R'
'utils_error_misc.R'
Expand Down
22 changes: 22 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Generated by roxygen2: do not edit by hand

S3method(simulate_data,Raster)
S3method(simulate_data,SpatRaster)
S3method(simulate_data,sf)
S3method(spatial_data_statistics,Raster)
S3method(spatial_data_statistics,data.frame)
S3method(spatial_data_statistics,sf)
S3method(spatial_data_type,Raster)
S3method(spatial_data_type,data.frame)
S3method(spatial_data_type,sf)
export(":=")
export(.data)
export(Exclude)
export(ExcludeResults)
export(FeatureResults)
Expand All @@ -20,6 +25,8 @@ export(acknowledge_packages)
export(acknowledgmentsSidebarPane)
export(addMapManagerLayer)
export(addSolutionResults)
export(as_label)
export(as_name)
export(calculate_coverage)
export(change_file_icon_js)
export(cleanImportSettings)
Expand All @@ -31,9 +38,12 @@ export(dropMapManagerLayer)
export(dropSolutionResults)
export(enable_html_css_selector)
export(enable_html_element)
export(enquo)
export(enquos)
export(error_log)
export(error_message)
export(exportSidebarPane)
export(expr)
export(extract_data_matrix)
export(find_projects)
export(get_golem_config)
Expand Down Expand Up @@ -98,6 +108,7 @@ export(shapefile_field_names)
export(showSolutionResults)
export(simulate_categorical_legend)
export(simulate_continuous_legend)
export(simulate_data)
export(simulate_exclude_legend)
export(simulate_excludes)
export(simulate_include_legend)
Expand All @@ -114,6 +125,8 @@ export(solutionSettings)
export(solutionSettingsOutput)
export(spatial_data_statistics)
export(spatial_data_type)
export(sym)
export(syms)
export(updateImportSettings)
export(updateMapManagerLayer)
export(updateMapManagerOrder)
Expand All @@ -131,3 +144,12 @@ importFrom(golem,activate_js)
importFrom(golem,add_resource_path)
importFrom(golem,bundle_resources)
importFrom(golem,favicon)
importFrom(rlang,":=")
importFrom(rlang,.data)
importFrom(rlang,as_label)
importFrom(rlang,as_name)
importFrom(rlang,enquo)
importFrom(rlang,enquos)
importFrom(rlang,expr)
importFrom(rlang,sym)
importFrom(rlang,syms)
8 changes: 3 additions & 5 deletions R/fct_simulate_excludes.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ NULL
#' d <- new_dataset(f1, f2, f3)
#'
#' # simulate data
#' if (requireNamespace("RandomFields")) {
#' x <- simulate_excludes(dataset = d, n = 2)
#' # print results
#' print(x)
#' }
#' x <- simulate_excludes(dataset = d, n = 2)
#' # print results
#' print(x)
#'
#' @export
simulate_excludes <- function(dataset, n) {
Expand Down
8 changes: 3 additions & 5 deletions R/fct_simulate_includes.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ NULL
#' d <- new_dataset(f1, f2, f3)
#'
#' # simulate data
#' if (requireNamespace("RandomFields")) {
#' x <- simulate_includes(dataset = d, n = 2)
#' # print results
#' print(x)
#' }
#' x <- simulate_includes(dataset = d, n = 2)
#' # print results
#' print(x)
#'
#' @export
simulate_includes <- function(dataset, n) {
Expand Down
Loading

0 comments on commit 46a5e60

Please sign in to comment.