Skip to content

Commit c2fa4ef

Browse files
first run with authoring wf
1 parent 25ade0b commit c2fa4ef

30 files changed

Lines changed: 328 additions & 162 deletions

.Rbuildignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
^.*\.Rproj$
22
^\.Rproj\.user$
33
^ready\.Rproj$
4-
^ready4space\.Rproj$
4+
^vicinity\.Rproj$
55
^LICENSE\.md$
66
^_pkgdown\.yml$
77
^docs$

.github/workflows/R-CMD-check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ jobs:
4242
steps:
4343
- uses: actions/checkout@v2
4444

45-
- uses: r-lib/actions/setup-r@master
45+
- uses: r-lib/actions/setup-r@v2
4646
with:
4747
r-version: ${{ matrix.config.r }}
4848
http-user-agent: ${{ matrix.config.http-user-agent }}
4949

50-
- uses: r-lib/actions/setup-pandoc@master
50+
- uses: r-lib/actions/setup-pandoc@v2
5151

5252
- name: Query dependencies
5353
run: |

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ready4space - Model Spatial Attributes with Ready4
1+
vicinity - Model Spatial Attributes with Ready4
22
Copyright (C) 2023 Orygen
33

44
This program is free software: you can redistribute it and/or modify

NAMESPACE

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Generated by roxygen2: do not edit by hand
22

33
export("%>%")
4-
export(Ready4spaceenv)
4+
export(VicinitySpaceTime)
55
export(add_uid_lup)
66
export(deprecated)
7-
export(is_ready4space_parameters)
8-
export(is_ready4space_values)
9-
export(make_new_ready4space_parameters)
10-
export(make_new_ready4space_values)
11-
export(make_pt_ready4space_parameters)
12-
export(make_pt_ready4space_values)
13-
export(ready4space_parameters)
14-
export(ready4space_values)
15-
export(validate_ready4space_parameters)
16-
export(validate_ready4space_values)
17-
exportClasses(Ready4spaceenv)
7+
export(is_vicinity_parameters)
8+
export(is_vicinity_values)
9+
export(make_new_vicinity_parameters)
10+
export(make_new_vicinity_values)
11+
export(make_pt_vicinity_parameters)
12+
export(make_pt_vicinity_values)
13+
export(validate_vicinity_parameters)
14+
export(validate_vicinity_values)
15+
export(vicinity_parameters)
16+
export(vicinity_values)
17+
exportClasses(VicinitySpaceTime)
1818
import(methods)
1919
importFrom(dplyr,arrange)
2020
importFrom(dplyr,filter)
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11

2-
setOldClass(c("ready4space_parameters","tbl_df", "tbl", "data.frame"))
2+
setOldClass(c("vicinity_parameters","tbl_df", "tbl", "data.frame"))
33
#' ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
44
#' @description Create a new valid instance of the ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
5-
#' @param x A prototype for the ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment., Default: make_pt_ready4space_parameters()
5+
#' @param x A prototype for the ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment., Default: make_pt_vicinity_parameters()
66
#' @return A validated instance of the ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
77
#' @details ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
8-
#' @rdname ready4space_parameters
8+
#' @rdname vicinity_parameters
99
#' @export
10-
ready4space_parameters <- function(x = make_pt_ready4space_parameters()){
11-
validate_ready4space_parameters(make_new_ready4space_parameters(x))
10+
vicinity_parameters <- function(x = make_pt_vicinity_parameters()){
11+
validate_vicinity_parameters(make_new_vicinity_parameters(x))
1212
}
13-
#' make new ready4space parameters ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
13+
#' make new vicinity parameters ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
1414
#' @description Create a new unvalidated instance of the ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
1515
#' @param x A prototype for the ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
1616
#' @return An unvalidated instance of the ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
1717
#' @details ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
18-
#' @rdname make_new_ready4space_parameters
18+
#' @rdname make_new_vicinity_parameters
1919
#' @export
2020
#' @importFrom tibble is_tibble
2121
#' @keywords internal
22-
make_new_ready4space_parameters <- function(x){
22+
make_new_vicinity_parameters <- function(x){
2323
stopifnot(tibble::is_tibble(x))
24-
class(x) <- append(c("ready4space_parameters",setdiff(make_pt_ready4space_parameters() %>% class(),class(x))),
24+
class(x) <- append(c("vicinity_parameters",setdiff(make_pt_vicinity_parameters() %>% class(),class(x))),
2525
class(x))
2626
x
2727
}
28-
#' make prototype ready4space parameters ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
28+
#' make prototype vicinity parameters ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
2929
#' @param param_name_chr Parameter name (a character vector), Default: character(0)
3030
#' @param deterministic_val_dbl Deterministic value (a double vector), Default: numeric(0)
3131
#' @param distribution_chr Distribution (a character vector), Default: character(0)
@@ -38,12 +38,12 @@ x
3838
#' @param source_chr Source (a character vector), Default: character(0)
3939
#' @return A prototype for ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
4040
#'
41-
#' @rdname ready4space_parameters
41+
#' @rdname vicinity_parameters
4242
#' @export
4343
#' @importFrom ready4 update_pt_fn_args_ls
4444
#' @importFrom rlang exec
4545
#' @importFrom tibble tibble
46-
make_pt_ready4space_parameters <- function(param_name_chr = character(0),
46+
make_pt_vicinity_parameters <- function(param_name_chr = character(0),
4747
deterministic_val_dbl = numeric(0),
4848
distribution_chr = character(0),
4949
dstr_param_1_dbl = numeric(0),
@@ -65,27 +65,27 @@ use_in_chr = use_in_chr,
6565
source_chr = source_chr) %>% ready4::update_pt_fn_args_ls()
6666
rlang::exec(tibble::tibble,!!!args_ls)
6767
}
68-
#' validate ready4space parameters ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
68+
#' validate vicinity parameters ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
6969
#' @description Validate an instance of the ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
7070
#' @param x An unvalidated instance of the ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
7171
#' @return A prototpe for ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
7272
#' @details ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
73-
#' @rdname validate_ready4space_parameters
73+
#' @rdname validate_vicinity_parameters
7474
#' @export
7575
#' @importFrom stringr str_detect str_c
7676
#' @importFrom dplyr summarise_all filter arrange pull
7777
#' @importFrom tidyr gather
7878
#' @importFrom purrr map_chr map2_chr
7979
#' @keywords internal
80-
validate_ready4space_parameters <- function(x){
81-
if(sum(stringr::str_detect(names(x)[names(x) %in% names(make_pt_ready4space_parameters())],
82-
names(make_pt_ready4space_parameters())))!=length(names(make_pt_ready4space_parameters()))){
80+
validate_vicinity_parameters <- function(x){
81+
if(sum(stringr::str_detect(names(x)[names(x) %in% names(make_pt_vicinity_parameters())],
82+
names(make_pt_vicinity_parameters())))!=length(names(make_pt_vicinity_parameters()))){
8383
stop(paste0("TIBBLE must include columns named: ",
84-
names(make_pt_ready4space_parameters()) %>% stringr::str_c(sep="", collapse = ", ")),
84+
names(make_pt_vicinity_parameters()) %>% stringr::str_c(sep="", collapse = ", ")),
8585
call. = FALSE)
8686
}
8787

88-
if(!identical(make_pt_ready4space_parameters() %>%
88+
if(!identical(make_pt_vicinity_parameters() %>%
8989
dplyr::summarise_all(class) %>%
9090
tidyr::gather(variable,class) %>%
9191
dplyr::filter(!is.na(class)) %>%
@@ -94,11 +94,11 @@ x %>%
9494
dplyr::summarise_all(class) %>%
9595
tidyr::gather(variable,class) %>%
9696
dplyr::filter(!is.na(class)) %>%
97-
dplyr::filter(variable %in% names(make_pt_ready4space_parameters())) %>% dplyr::arrange(variable))){
97+
dplyr::filter(variable %in% names(make_pt_vicinity_parameters())) %>% dplyr::arrange(variable))){
9898
stop(paste0("TIBBLE columns should be of the following classes: ",
9999
"",
100100
{
101-
class_lup <- make_pt_ready4space_parameters() %>%
101+
class_lup <- make_pt_vicinity_parameters() %>%
102102
dplyr::summarise_all(class) %>%
103103
tidyr::gather(variable,class) %>%
104104
dplyr::filter(!is.na(class))
@@ -114,10 +114,10 @@ call. = FALSE)
114114
}
115115

116116
x}
117-
#' is ready4space parameters ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
117+
#' is vicinity parameters ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
118118
#' @param x An object of any type
119119
#' @return A logical value, TRUE if a valid instance of the ready4 S3 class for tibble object that stores simulation structural parameters relating to the spatial environment.
120120
#'
121-
#' @rdname ready4space_parameters
121+
#' @rdname vicinity_parameters
122122
#' @export
123-
is_ready4space_parameters <- function(x) inherits(validate_ready4space_parameters(x), "ready4space_parameters")
123+
is_vicinity_parameters <- function(x) inherits(validate_vicinity_parameters(x), "vicinity_parameters")
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
11

2-
setOldClass(c("ready4space_values","tbl_df", "tbl", "data.frame"))
2+
setOldClass(c("vicinity_values","tbl_df", "tbl", "data.frame"))
33
#' ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
44
#' @description Create a new valid instance of the ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
5-
#' @param x A prototype for the ready4 S3 class for tibble object that stores simulation parameter values for each iteration., Default: make_pt_ready4space_values()
5+
#' @param x A prototype for the ready4 S3 class for tibble object that stores simulation parameter values for each iteration., Default: make_pt_vicinity_values()
66
#' @return A validated instance of the ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
77
#' @details ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
8-
#' @rdname ready4space_values
8+
#' @rdname vicinity_values
99
#' @export
10-
ready4space_values <- function(x = make_pt_ready4space_values()){
11-
validate_ready4space_values(make_new_ready4space_values(x))
10+
vicinity_values <- function(x = make_pt_vicinity_values()){
11+
validate_vicinity_values(make_new_vicinity_values(x))
1212
}
13-
#' make new ready4space values ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
13+
#' make new vicinity values ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
1414
#' @description Create a new unvalidated instance of the ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
1515
#' @param x A prototype for the ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
1616
#' @return An unvalidated instance of the ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
1717
#' @details ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
18-
#' @rdname make_new_ready4space_values
18+
#' @rdname make_new_vicinity_values
1919
#' @export
2020
#' @importFrom tibble is_tibble
2121
#' @keywords internal
22-
make_new_ready4space_values <- function(x){
22+
make_new_vicinity_values <- function(x){
2323
stopifnot(tibble::is_tibble(x))
24-
class(x) <- append(c("ready4space_values",setdiff(make_pt_ready4space_values() %>% class(),class(x))),
24+
class(x) <- append(c("vicinity_values",setdiff(make_pt_vicinity_values() %>% class(),class(x))),
2525
class(x))
2626
x
2727
}
28-
#' make prototype ready4space values ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
28+
#' make prototype vicinity values ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
2929
#' @param param_name_chr Parameter name (a character vector), Default: character(0)
3030
#' @param iteration_1_dbl Iteration 1 (a double vector), Default: numeric(0)
3131
#' @return A prototype for ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
3232
#'
33-
#' @rdname ready4space_values
33+
#' @rdname vicinity_values
3434
#' @export
3535
#' @importFrom ready4 update_pt_fn_args_ls
3636
#' @importFrom rlang exec
3737
#' @importFrom tibble tibble
38-
make_pt_ready4space_values <- function(param_name_chr = character(0),
38+
make_pt_vicinity_values <- function(param_name_chr = character(0),
3939
iteration_1_dbl = numeric(0)){
4040
args_ls <- list(param_name_chr = param_name_chr,
4141
iteration_1_dbl = iteration_1_dbl) %>% ready4::update_pt_fn_args_ls()
4242
rlang::exec(tibble::tibble,!!!args_ls)
4343
}
44-
#' validate ready4space values ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
44+
#' validate vicinity values ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
4545
#' @description Validate an instance of the ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
4646
#' @param x An unvalidated instance of the ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
4747
#' @return A prototpe for ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
4848
#' @details ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
49-
#' @rdname validate_ready4space_values
49+
#' @rdname validate_vicinity_values
5050
#' @export
5151
#' @importFrom stringr str_detect str_c
5252
#' @importFrom dplyr summarise_all filter arrange pull
5353
#' @importFrom tidyr gather
5454
#' @importFrom purrr map_chr map2_chr
5555
#' @keywords internal
56-
validate_ready4space_values <- function(x){
57-
if(sum(stringr::str_detect(names(x)[names(x) %in% names(make_pt_ready4space_values())],
58-
names(make_pt_ready4space_values())))!=length(names(make_pt_ready4space_values()))){
56+
validate_vicinity_values <- function(x){
57+
if(sum(stringr::str_detect(names(x)[names(x) %in% names(make_pt_vicinity_values())],
58+
names(make_pt_vicinity_values())))!=length(names(make_pt_vicinity_values()))){
5959
stop(paste0("TIBBLE must include columns named: ",
60-
names(make_pt_ready4space_values()) %>% stringr::str_c(sep="", collapse = ", ")),
60+
names(make_pt_vicinity_values()) %>% stringr::str_c(sep="", collapse = ", ")),
6161
call. = FALSE)
6262
}
6363

64-
if(!identical(make_pt_ready4space_values() %>%
64+
if(!identical(make_pt_vicinity_values() %>%
6565
dplyr::summarise_all(class) %>%
6666
tidyr::gather(variable,class) %>%
6767
dplyr::filter(!is.na(class)) %>%
@@ -70,11 +70,11 @@ x %>%
7070
dplyr::summarise_all(class) %>%
7171
tidyr::gather(variable,class) %>%
7272
dplyr::filter(!is.na(class)) %>%
73-
dplyr::filter(variable %in% names(make_pt_ready4space_values())) %>% dplyr::arrange(variable))){
73+
dplyr::filter(variable %in% names(make_pt_vicinity_values())) %>% dplyr::arrange(variable))){
7474
stop(paste0("TIBBLE columns should be of the following classes: ",
7575
"",
7676
{
77-
class_lup <- make_pt_ready4space_values() %>%
77+
class_lup <- make_pt_vicinity_values() %>%
7878
dplyr::summarise_all(class) %>%
7979
tidyr::gather(variable,class) %>%
8080
dplyr::filter(!is.na(class))
@@ -90,10 +90,10 @@ call. = FALSE)
9090
}
9191

9292
x}
93-
#' is ready4space values ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
93+
#' is vicinity values ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
9494
#' @param x An object of any type
9595
#' @return A logical value, TRUE if a valid instance of the ready4 S3 class for tibble object that stores simulation parameter values for each iteration.
9696
#'
97-
#' @rdname ready4space_values
97+
#' @rdname vicinity_values
9898
#' @export
99-
is_ready4space_values <- function(x) inherits(validate_ready4space_values(x), "ready4space_values")
99+
is_vicinity_values <- function(x) inherits(validate_vicinity_values(x), "vicinity_values")
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
#' Ready4spaceenv
1+
#' VicinitySpaceTime
22
#'
33
#' Spatiotemporal environment
44
#'
55
#' @slot data_ls Data (a list)
66
#' @slot env_sf Environment (a simple features object)
77
#' @slot param_vals_tb Parameter values (a tibble)
8-
#' @name Ready4spaceenv-class
9-
#' @rdname Ready4spaceenv-class
10-
#' @export Ready4spaceenv
11-
#' @exportClass Ready4spaceenv
12-
Ready4spaceenv <- methods::setClass("Ready4spaceenv",
8+
#' @name VicinitySpaceTime-class
9+
#' @rdname VicinitySpaceTime-class
10+
#' @export VicinitySpaceTime
11+
#' @exportClass VicinitySpaceTime
12+
VicinitySpaceTime <- methods::setClass("VicinitySpaceTime",
1313
slots = c(data_ls = "list",env_sf = "sf",param_vals_tb = "tbl_df"),
1414
prototype = list(data_ls = list(list()),env_sf = sf::st_sf(sf::st_sfc()),param_vals_tb = tibble::tibble()))
1515

1616

17-
methods::setValidity(methods::className("Ready4spaceenv"),
17+
methods::setValidity(methods::className("VicinitySpaceTime"),
1818
function(object){
1919
msg <- NULL
2020
if (is.null(msg)) TRUE else msg
File renamed without changes.

0 commit comments

Comments
 (0)