Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.4.0.2 #112

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 12 additions & 20 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,38 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
branches:
- master
pull_request:
branches:
- master

name: R-CMD-check.yaml

permissions: read-all
name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

if: "!contains(github.event.head_commit.message, 'ci skip')"
name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

- {os: windows-latest, r: 'devel'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel'}
- {os: ubuntu-latest, r: 'release'}
env:
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
Expand All @@ -46,6 +41,3 @@ jobs:
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: fasterRaster
Type: Package
Title: Faster Raster and Spatial Vector Processing Using 'GRASS GIS'
Version: 8.4.0.1
Date: 2024-12-03
Version: 8.4.0.2
Date: 2024-12-09
Authors@R:
c(
person(
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# fasterRaster 8.4.0.2 (2024-12-09)
o Fixed issues from CRAN precheck.

# fasterRaster 8.4.0.0 (2024-11-20)

### Potentially code-breaking changes
Expand Down
2 changes: 1 addition & 1 deletion R/datatype.r
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' * `"fasterRaster"` (default): Reports the **fasterRaster** type (factor, integer, float, or double)
#' * `"terra"`: Report the (inferred) **terra** data type (e.g., INT2U, FLT4S). Please see the table in the documentation for [writeRaster()` for an explanation of these codes.
#' * `"GRASS"`: Will return "CELL" (integer), "FCELL" (floating-point value), or "DCELL" (double-floating point value)
#' * `"GDAL"`: See [GDAL: Raster Band](https://gdal.org/user/raster_data_model.html#raster-band). Please also see the table in the [writeRaster()] help file.
#' * `"GDAL"`: See [GDAL: Raster Band](https://gdal.org/user/raster_data_model.html). Please also see the table in the [writeRaster()] help page.
#'
#' @param forceDouble Logical (`GRaster`s and `SpatRaster`s only): If `TRUE` (default), and the raster appears to represent non-integer values, then the raster will be assumed to represent double-floating point values (**GRASS**: type "DCELL", **terra**: type "FLT8S", **fasterRaster**: type "double", and **GDAL**: type "Float64"). `forceDouble` reports the actual datatype if `type = "fasterRaster"` (i.e., the type is not forced to "double").
#'
Expand Down
2 changes: 1 addition & 1 deletion R/madRivers.r
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#'
#' @keywords Madagascar
#'
#' @source [DIVA-GIS](http://www.diva-gis.org/gdata)
#' @source [DIVA-GIS](https://diva-gis.org/)
#'
#' @example man/examples/ex_fastData.r
#'
Expand Down
35 changes: 15 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# fasterRaster
<!-- badges: start -->

[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html) [![R-CMD-check](https://github.com/adamlilith/fasterRaster/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/adamlilith/fasterRaster/actions/workflows/R-CMD-check.yaml)
[![cran version](https://www.r-pkg.org/badges/version/fasterRaster)](https://cran.r-project.org/package=fasterRaster) [![R-CMD-check](https://github.com/adamlilith/fasterRaster/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/adamlilith/fasterRaster/actions/workflows/R-CMD-check.yaml) [![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)

<!-- badges: end -->

Faster raster processing in `R` using `GRASS GIS`

<a href="https://adamlilith.github.io/fasterRaster/"><img src="man/figures/logo.png" align="right" height="232" alt="fasterRaster website" /></a>

`fasterRaster` is an **R** package designed specifically to handle large-in-memory/large-on-disk spatial rasters and vectors. `fasterRaster` does this using Open Source Geospatial's <a href="https://grass.osgeo.org/rgrass/">`GRASS GIS`</a>
`fasterRaster` is an **R** package designed specifically to handle large-in-memory/large-on-disk spatial rasters and vectors. `fasterRaster` does this using Open Source Geospatial's <a href="https://grass.osgeo.org/">`GRASS GIS`</a>

`fasterRaster` was created with five design principles:

Expand All @@ -21,35 +20,31 @@ Faster raster processing in `R` using `GRASS GIS`

`fasterRaster` makes heavy use of the <a href="https://cran.r-project.org/package=rgrass">`rgrass`</a> package by Roger Bivand and others, the <a href="https://cran.r-project.org/package=rgrass">`terra`</a> package by Robert Hijmans, the <a href="https://cran.r-project.org/package=sf">`sf`</a> package by Edzer Pebesma, Roger Bivand, and others, and of course <a href="https://grass.osgeo.org/">`GRASS GIS`</a>, so is greatly indebted to all of these creators!

# Where we are
As of 2024/11/20, a new version of this package, `fasterRaster 8.4`, is in alpha release (i.e., near final release) and can run with **GRASS** 8.3 or 8.4. There are known issues and unknown issues. If you encounter one of the latter, please file an <a href="https://github.com/adamlilith/fasterRaster/issues">issue</a> report.

**Special announcement #1**: We now have a **pkgdown** <a href="https://adamlilith.github.io/fasterRaster/">site</a> with all the package documentation--plus vignettes!
# Vignettes & documentation
**fasterRaster** comes with four user-oriented vignettes:

**Special announcement #2**: The new `bioclims()` function creates the "classic" set of BIOCLIM variables, plus an optional "extended" set. The function works on **fasterRaster** `GRaster`s and on **terra** `SpatRaster`s!
o <a href="https://adamlilith.github.io/fasterRaster/articles/fasterRaster.html">Getting started</a> (also reproduced below)
o <a href="https://adamlilith.github.io/fasterRaster/articles/GRasters.html">Types of `GRaster`s</a>
o <a href="https://adamlilith.github.io/fasterRaster/articles/faster_fasterRaster.html">Making **fasterRaster** faster</a>
o <a href="https://adamlilith.github.io/fasterRaster/articles/addons.html">Addons</a>
o <a href="https://adamlilith.github.io/fasterRaster/">Documentation</a>

# Installation

To install `fasterRaster`, please use:

`install_packages('fasterRaster', dependencies = TRUE)`

You can get the latest stable release using:

`remotes::install_github('adamlilith/fasterRaster', dependencies = TRUE)`

Alternatively, you can install the development version from:
...and the development version from:

`remotes::install_github('adamlilith/fasterRaster@intuitive_fasterRaster', dependencies = TRUE)`

To use `fasterRaster` you must install [GRASS version 8.3+](https://grass.osgeo.org/) on your operating system. **You will need to use the stand-alone installer, not the Open Source Geospatial (OS Geo) installer.**

Optional: A few functions in **fasterRaster** require **GRASS** "addon" modules, which do not come bundled with **GRASS**. You do not need to install these addons if you do not use functions that call them. A list of functions that require addons can be seen in the "addons" vignette (in **R**, use `vignette("addons", package = "fasterRaster")`). This vignette also explains how to install addons.

# Vignettes

**fasterRaster** comes with four user-oriented vignettes:

* ["Getting started"](https://adamlilith.github.io/fasterRaster/articles/fasterRaster.html)
* [Types of `GRaster`s](https://adamlilith.github.io/fasterRaster/articles/GRasters.html)
* [Making **fasterRaster** faster](https://adamlilith.github.io/fasterRaster/articles/faster_fasterRaster.html)
* [Installing addons](https://adamlilith.github.io/fasterRaster/articles/addons.html)
**Optional**: A few functions in **fasterRaster** require **GRASS** "addon" modules, which do not come bundled with **GRASS**. You do not need to install these addons if you do not use functions that call them. A list of functions that require addons can be seen in the "addons" vignette (in **R**, use `vignette("addons", package = "fasterRaster")`). This vignette also explains how to install addons.

# An example

Expand Down
4 changes: 1 addition & 3 deletions inst/CITATION
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
key <- paste0("R-", meta$Package)
year <- sub("-.*", "", meta$Date)
note <- sprintf("R package version %s", meta$Version)
doi <- "NA"
title <- paste0(meta$Package, ": ", meta$Title)

citHeader("To cite fasterRaster in publications use:")
Expand All @@ -12,6 +11,5 @@ bibentry(bibtype = "Manual",
family = "Smith",
comment = c(ORCID = "0000-0002-8215-2053")),
year = year,
note = note,
doi = doi
note = note
)
2 changes: 1 addition & 1 deletion inst/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ articles:
hidden_functions: hidden_functions.html
projects_mapsets: projects_mapsets.html
regions: regions.html
last_built: 2024-11-25T06:03Z
last_built: 2024-12-09T17:02Z
urls:
reference: https://github.com/adamlilith/fasterRaster/reference
article: https://github.com/adamlilith/fasterRaster/articles
2 changes: 1 addition & 1 deletion man/datatype.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/madRivers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vignettes/GRasters.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Categorical rasters (also called "factor" rasters) are actually integer rasters,
* [`combineLevels()`](https://adamlilith.github.io/fasterRaster/reference/combineLevels.html): Combine the "levels" tables of two or more categorical `GRaster`s.
* [`complete.cases()`](https://adamlilith.github.io/fasterRaster/reference/complete.cases.html) finds rows in the levels table that have no `NA`s.
* [`concats()`](https://adamlilith.github.io/fasterRaster/reference/combineCats.html) combines levels of two or more categorical or integer rasters by concatenating them.
* [`droplevels()`](https://adamlilith.github.io/fasterRaster/reference/dropevels.html) removes "unused" levels in a "levels" table.
* [`droplevels()`](https://adamlilith.github.io/fasterRaster/reference/droplevels.html) removes "unused" levels in a "levels" table.
* [`levels()`](https://adamlilith.github.io/fasterRaster/reference/levels.html) returns the "levels" table of a categorical raster (just the value column and the active column).
* [`levels<-`](https://adamlilith.github.io/fasterRaster/reference/levels.html) and [`categories()`](https://adamlilith.github.io/fasterRaster/reference/categories.html) can be used to assign categories to an integer raster and make it categorical (i.e., a "factor" raster).
* [`match()`](https://adamlilith.github.io/fasterRaster/reference/match.html), [`%in%`](https://adamlilith.github.io/fasterRaster/reference/match.html), and [`$%notin%$`](https://adamlilith.github.io/fasterRaster/reference/match.html): Find which cells of a `GRaster` match or do not match certain category labels
Expand Down
Loading