Skip to content

Commit

Permalink
Merge pull request #36 from Spatiotemporal-Exposures-and-Toxicology/d…
Browse files Browse the repository at this point in the history
…ev03

crop hotfix
  • Loading branch information
sigmafelix authored Jan 4, 2024
2 parents 2dd2c71 + c1fc267 commit 89d9b71
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ URL: https://Spatiotemporal-Exposures-and-Toxicology.github.io/Scalable_GIS
VignetteBuilder: knitr
Config/testthat/edition: 3
LitrVersionUsed: 0.9.0
LitrId: e0e37a23a0fd922826781cebde84874e
LitrId: cc31c83588710b5d1dccb4a47c85cd65
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2023
YEAR: 2024
COPYRIGHT HOLDER: I. Song
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2023 I. Song
Copyright (c) 2024 I. Song

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions R/processing.R
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ extract_with_buffer_flat <- function(
bufs <- reproject_b2r(bufs, surf)
# crop raster
bufs_extent <- terra::ext(bufs)
surf_cropped <- terra::crop(surf, bufs_extent)
surf_cropped <- terra::crop(surf, bufs_extent, snap = "out")

# extract raster values
surf_at_bufs <-
Expand Down Expand Up @@ -211,7 +211,7 @@ extract_with_buffer_kernel <- function(

# crop raster
bufs_extent <- terra::ext(bufs)
surf_cropped <- terra::crop(surf, bufs_extent)
surf_cropped <- terra::crop(surf, bufs_extent, snap = "out")
name_surf_val <-
ifelse(terra::nlyr(surf_cropped) == 1,
"value", names(surf_cropped))
Expand Down
12 changes: 3 additions & 9 deletions scomps_rmarkdown_litr.html
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ <h3>Create functions</h3>
bufs &lt;- reproject_b2r(bufs, surf)
# crop raster
bufs_extent &lt;- terra::ext(bufs)
surf_cropped &lt;- terra::crop(surf, bufs_extent)
surf_cropped &lt;- terra::crop(surf, bufs_extent, snap = &quot;out&quot;)

# extract raster values
surf_at_bufs &lt;-
Expand Down Expand Up @@ -1541,7 +1541,7 @@ <h3>Create functions</h3>

# crop raster
bufs_extent &lt;- terra::ext(bufs)
surf_cropped &lt;- terra::crop(surf, bufs_extent)
surf_cropped &lt;- terra::crop(surf, bufs_extent, snap = &quot;out&quot;)
name_surf_val &lt;-
ifelse(terra::nlyr(surf_cropped) == 1,
&quot;value&quot;, names(surf_cropped))
Expand Down Expand Up @@ -3033,13 +3033,7 @@ <h2>Documenting the package and building</h2>
## Warning: invalid uid value replaced by that for user &#39;nobody&#39;
## Warning: invalid gid value replaced by that for user &#39;nobody&#39;</code></pre>
<pre><code>## [1] &quot;/Users/songi2/Documents/GitHub/Scalable_GIS/scomps_0.1.1.12192023.tar.gz&quot;</code></pre>
<pre><code>## sf (1.0-14 -&gt; 1.0-15) [CRAN]</code></pre>
<pre><code>## Installing 1 packages: sf</code></pre>
<pre><code>## Installing package into &#39;/Users/songi2/Library/R/arm64/4.3/library&#39;
## (as &#39;lib&#39; is unspecified)</code></pre>
<pre><code>##
## The downloaded binary packages are in
## /var/folders/58/7rn_bn5d6k3_cxwnzdhswpz4n0z2n9/T//RtmpvTxaud/downloaded_packages
## ── R CMD build ─────────────────────────────────────────────────────────────────
## * checking for file ‘/Users/songi2/Documents/GitHub/Scalable_GIS/scomps/DESCRIPTION’ ... OK
## * preparing ‘scomps’:
Expand All @@ -3053,7 +3047,7 @@ <h2>Documenting the package and building</h2>
## Warning: invalid gid value replaced by that for user &#39;nobody&#39;
##
## Running /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL \
## /var/folders/58/7rn_bn5d6k3_cxwnzdhswpz4n0z2n9/T//RtmpvTxaud/scomps_0.1.1.12192023.tar.gz \
## /var/folders/58/7rn_bn5d6k3_cxwnzdhswpz4n0z2n9/T//RtmpqsbDcn/scomps_0.1.1.12192023.tar.gz \
## --install-tests --no-docs --no-multiarch --no-demo
## * installing to library ‘/Users/songi2/Library/R/arm64/4.3/library’
## * installing *source* package ‘scomps’ ...
Expand Down
4 changes: 2 additions & 2 deletions scomps_rmarkdown_litr.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ extract_with_buffer_flat <- function(
bufs <- reproject_b2r(bufs, surf)
# crop raster
bufs_extent <- terra::ext(bufs)
surf_cropped <- terra::crop(surf, bufs_extent)
surf_cropped <- terra::crop(surf, bufs_extent, snap = "out")
# extract raster values
surf_at_bufs <-
Expand Down Expand Up @@ -1315,7 +1315,7 @@ extract_with_buffer_kernel <- function(
# crop raster
bufs_extent <- terra::ext(bufs)
surf_cropped <- terra::crop(surf, bufs_extent)
surf_cropped <- terra::crop(surf, bufs_extent, snap = "out")
name_surf_val <-
ifelse(terra::nlyr(surf_cropped) == 1,
"value", names(surf_cropped))
Expand Down
Binary file modified tools/tarballs/scomps_0.1.1.12192023.tar.gz
Binary file not shown.

0 comments on commit 89d9b71

Please sign in to comment.