Skip to content

Commit

Permalink
Merge pull request #28 from larmarange/dev_v5
Browse files Browse the repository at this point in the history
Development of a version 5 based on `sf`
  • Loading branch information
larmarange committed May 15, 2023
2 parents 875f80d + 3b98898 commit fc42ae5
Show file tree
Hide file tree
Showing 80 changed files with 4,297 additions and 4,168 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ gps.dbf
^revdep$
^\.github$
^CRAN-SUBMISSION$
.lintr
LICENSE.md
19 changes: 5 additions & 14 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# 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
#
# NOTE: This workflow is overkill for most R packages and
# check-standard.yaml is likely a better choice.
# usethis::use_github_action("check-standard") will install it.
on:
push:
branches: [main, master]
Expand All @@ -22,23 +18,18 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}

- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
# Use 3.6 to trigger usage of RTools35
- {os: windows-latest, r: '3.6'}

# Use older ubuntu to maximise backward compatibility
- {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-18.04, r: 'release'}
- {os: ubuntu-18.04, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,27 @@ on:
pull_request:
branches: [main, master]

name: test-coverage
name: lint

jobs:
test-coverage:
lint:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage
extra-packages: any::lintr, local::.
needs: lint

- name: Test coverage
run: covr::codecov(quiet = FALSE)
- name: Lint
run: lintr::lint_package()
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
2 changes: 2 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
linters: linters_with_defaults(object_name_linter = NULL, cyclocomp_linter = NULL) # see vignette("lintr")
encoding: "UTF-8"
47 changes: 10 additions & 37 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,22 @@ LazyData: yes
Depends:
R (>= 3.5.0)
Imports:
sp,
rgdal (>= 0.7),
ggplot2,
directlabels,
ggplot2,
gstat,
KernSmooth,
fields,
gstat,
foreign,
maptools,
methods
methods,
sf,
stars
Suggests:
grDevices,
knitr,
rmarkdown
rmarkdown,
spelling,
terra
Encoding: UTF-8
Collate:
'prevR-package.r'
'setClass.prevR.r'
'is.prevR.r'
'as.prevR.r'
'onAttach.r'
'isInputOk.prevR.r'
'changeproj.prevR.r'
'colors.prevR.r'
'as.data.frame.prevR.r'
'plot.prevR.r'
'show.prevR.r'
'print.prevR.r'
'summary.prevR.r'
'rings.prevR.r'
'as.SpatialGrid.prevR.r'
'create.boundary.prevR.r'
'export.prevR.r'
'import.dhs.prevR.r'
'point.in.SpatialPolygons.prevR.r'
'NA.outside.SpatialPolygons.prevR.r'
'xyz2dataframe.prevR.r'
'init.exp.model.variogram.r'
'krige.prevR.r'
'kde.prevR.r'
'Noptim.r'
'theme_prevR.r'
'direct.label_prevR.r'
'quick.prevR.r'
VignetteBuilder: knitr
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
263 changes: 263 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

37 changes: 22 additions & 15 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Generated by roxygen2: do not edit by hand

S3method(as.data.frame,prevR)
export(NA.outside.SpatialPolygons)
export(Noptim)
export(as.prevR)
export(create.boundary)
export(direct.label_prevR)
export(import.dhs)
export(is.prevR)
export(point.in.SpatialPolygons)
export(make.grid.prevR)
export(prevR.colors.blue)
export(prevR.colors.blue.inverse)
export(prevR.colors.gray)
Expand All @@ -20,11 +19,12 @@ export(prevR.colors.red)
export(prevR.colors.red.inverse)
export(prevR.demo.pal)
export(quick.prevR)
export(st_filter_prevR)
export(theme_prevR)
export(theme_prevR_light)
export(update_prevR)
export(xyz2dataframe)
exportClasses(prevR)
exportMethods(as.SpatialGrid)
exportMethods(changeproj)
exportMethods(export)
exportMethods(idw)
Expand All @@ -36,7 +36,6 @@ exportMethods(rings)
exportMethods(show)
exportMethods(summary)
import(ggplot2)
import(sp)
importFrom(KernSmooth,bkde2D)
importFrom(directlabels,default.picker)
importFrom(directlabels,geom_dl)
Expand All @@ -46,6 +45,10 @@ importFrom(foreign,read.dbf)
importFrom(foreign,read.spss)
importFrom(foreign,write.dbf)
importFrom(ggplot2,'%+replace%')
importFrom(ggplot2,element_blank)
importFrom(ggplot2,theme)
importFrom(ggplot2,theme_grey)
importFrom(ggplot2,unit)
importFrom(grDevices,col2rgb)
importFrom(grDevices,dev.new)
importFrom(grDevices,gray)
Expand All @@ -56,25 +59,29 @@ importFrom(graphics,rect)
importFrom(graphics,sunflowerplot)
importFrom(graphics,text)
importFrom(graphics,title)
importFrom(gstat,as.vgm.variomodel)
importFrom(gstat,fit.variogram)
importFrom(gstat,idw)
importFrom(gstat,krige)
importFrom(gstat,variogram)
importFrom(gstat,vgm)
importFrom(maptools,writePointsShape)
importFrom(maptools,writePolyShape)
importFrom(methods,"slot<-")
importFrom(methods,`slot<-`)
importFrom(methods,as)
importFrom(methods,is)
importFrom(methods,new)
importFrom(methods,setClass)
importFrom(methods,setGeneric)
importFrom(methods,setMethod)
importFrom(methods,show)
importFrom(methods,slot)
importFrom(methods,slotNames)
importFrom(rgdal,writeOGR)
importFrom(sp,plot)
importFrom(sf,st_as_s2)
importFrom(sf,st_as_sf)
importFrom(sf,st_bbox)
importFrom(sf,st_coordinates)
importFrom(sf,st_crs)
importFrom(sf,st_drop_geometry)
importFrom(sf,st_filter)
importFrom(sf,st_polygon)
importFrom(sf,st_sf)
importFrom(sf,st_sfc)
importFrom(sf,st_transform)
importFrom(sf,st_write)
importFrom(stars,st_rasterize)
importFrom(stats,na.omit)
importFrom(stats,optim)
importFrom(stats,quantile)
Expand Down
11 changes: 11 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# prevR (development version)

**BREAKING CHANGE:**

* `prevR` objects now use `sf` spatial classes instead of those from `sp` (#27)
* you can use `update_prevR()` to update a `prevR` object created with a
previous version of the package
* `as.SpatialGrid()` method has been removed: use `make.grid.prevR()` instead
* `point.in.SpatialPolygons()` and `NA.outside.SpatialPolygons()` have been
removed, see `st_filter_prevR()` instead
* `kde()` and `krige()` methods now return results as an `sf` object, see
documentation for examples for plotting or exporting

# prevR 4.0.1

* Compatibility with `rlang` 0.3.0 and `ggplot2` 3.4.0 (#24)
Expand Down

0 comments on commit fc42ae5

Please sign in to comment.