Skip to content

Commit f4ce65b

Browse files
authored
RC 0.1.0 (#8)
* Bump version, add CRAN comments * Update README * Update misc functions * Add NEWS.md * Move to "auto" development mode for pkgdown * Ignore CRAN releases
1 parent 2015c8a commit f4ce65b

9 files changed

+45
-24
lines changed

.Rbuildignore

+2
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@
77
^_pkgdown\.yml$
88
^docs$
99
^pkgdown$
10+
^cran-comments\.md$
11+
^CRAN-RELEASE$

DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: spatialsample
22
Title: Spatial Resampling Infrastructure
3-
Version: 0.0.0.9000
3+
Version: 0.1.0
44
Authors@R: c(
55
person(given = "Julia",
66
family = "Silge",
@@ -10,7 +10,7 @@ Authors@R: c(
1010
person("RStudio", role = "cph")
1111
)
1212
Description: Functions and classes for spatial resampling to use with the
13-
'rsample' package, including spatial cross-validation (Brenning, 2012)
13+
'rsample' package, such as spatial cross-validation (Brenning, 2012)
1414
<doi:10.1109/IGARSS.2012.6352393>. The scope of 'rsample' and
1515
'spatialsample' is to provide the basic building blocks for creating and
1616
analyzing resamples of a spatial data set, but neither package includes

NEWS.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# spatialsample 0.1.0
2+
3+
* Added a `NEWS.md` file to track changes to the package.

R/misc.R

+2-12
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,14 @@ rm_out <- function(x) {
1515
x
1616
}
1717

18-
# Get the indices of the analysis set from the assessment set
18+
## Get the indices of the analysis set from the assessment set
1919
default_complement <- function(ind, n) {
2020
list(analysis = setdiff(1:n, ind),
2121
assessment = unique(ind))
2222
}
2323

24+
## Split, but no names
2425
split_unnamed <- function(x, f) {
2526
out <- split(x, f)
2627
unname(out)
2728
}
28-
29-
dim_rset <- function(x, ...) {
30-
dims <- purrr::map(x$splits, dim)
31-
dims <- do.call("rbind", dims)
32-
dims <- tibble::as_tibble(dims)
33-
id_cols <- grep("^id", colnames(x), value = TRUE)
34-
for (i in seq_along(id_cols)) {
35-
dims[id_cols[i]] <- getElement(x, id_cols[i])
36-
}
37-
dims
38-
}

README.Rmd

+3-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ theme_set(theme_minimal())
1818
# spatialsample
1919

2020
<!-- badges: start -->
21-
[![CRAN status](https://www.r-pkg.org/badges/version/spatialsample)](https://CRAN.R-project.org/package=spatialsample)
2221
[![R-CMD-check](https://github.com/tidymodels/spatialsample/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/spatialsample/actions)
2322
[![Codecov test coverage](https://codecov.io/gh/tidymodels/spatialsample/branch/master/graph/badge.svg)](https://codecov.io/gh/tidymodels/spatialsample?branch=master)
24-
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
23+
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html)
2524
<!-- badges: end -->
2625

2726
## Introduction
@@ -36,10 +35,10 @@ Like [rsample](https://rsample.tidymodels.org/), spatialsample provides building
3635

3736
## Installation
3837

39-
~~You can install the released version of spatialsample from [CRAN](https://CRAN.R-project.org) with:~~
38+
You can install the released version of spatialsample from [CRAN](https://CRAN.R-project.org) with:
4039

4140
``` r
42-
install.packages("spatialsample") ## not yet released
41+
install.packages("spatialsample")
4342
```
4443

4544
And the development version from [GitHub](https://github.com/) with:

README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55

66
<!-- badges: start -->
77

8-
[![CRAN
9-
status](https://www.r-pkg.org/badges/version/spatialsample)](https://CRAN.R-project.org/package=spatialsample)
108
[![R-CMD-check](https://github.com/tidymodels/spatialsample/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/spatialsample/actions)
119
[![Codecov test
1210
coverage](https://codecov.io/gh/tidymodels/spatialsample/branch/master/graph/badge.svg)](https://codecov.io/gh/tidymodels/spatialsample?branch=master)
1311
[![Lifecycle:
14-
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
12+
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html)
1513
<!-- badges: end -->
1614

1715
## Introduction
@@ -33,11 +31,11 @@ have much memory overhead.
3331

3432
## Installation
3533

36-
~~You can install the released version of spatialsample from
37-
[CRAN](https://CRAN.R-project.org) with:~~
34+
You can install the released version of spatialsample from
35+
[CRAN](https://CRAN.R-project.org) with:
3836

3937
``` r
40-
install.packages("spatialsample") ## not yet released
38+
install.packages("spatialsample")
4139
```
4240

4341
And the development version from [GitHub](https://github.com/) with:

_pkgdown.yml

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ template:
77
part_of: <a href="https://tidymodels.org">tidymodels</a>
88
footer: spatialsample is a part of the <strong>tidymodels</strong> ecosystem, a collection of modeling packages designed with common APIs and a shared philosophy.
99

10+
development:
11+
mode: auto
12+
1013
home:
1114
strip_header: true
1215

cran-comments.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Test environments
2+
3+
* local macOS install: release
4+
* macOS 10.15.7 (on GitHub actions): release
5+
* windows server 2019 10.0.17763 (on GitHub actions): olrel, release
6+
* ubuntu 20.04 (on GitHub actions): oldrel, release, devel
7+
* win-builder: release, devel
8+
9+
## R CMD check results
10+
11+
0 errors | 0 warnings | 1 note
12+
13+
* This is a new release.

tests/testthat/helper-rset.R

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# ------------------------------------------------------------------------------
22

3+
dim_rset <- function(x, ...) {
4+
dims <- purrr::map(x$splits, dim)
5+
dims <- do.call("rbind", dims)
6+
dims <- tibble::as_tibble(dims)
7+
id_cols <- grep("^id", colnames(x), value = TRUE)
8+
for (i in seq_along(id_cols)) {
9+
dims[id_cols[i]] <- getElement(x, id_cols[i])
10+
}
11+
dims
12+
}
13+
14+
# ------------------------------------------------------------------------------
15+
316
test_data <- function() {
417
data.frame(
518
x = 1:50,

0 commit comments

Comments
 (0)