Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 1, 2023
1 parent f4e9ad4 commit 6c90618
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/soil_compression_calculations.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


# ======================================================
# load packages

Expand Down
11 changes: 6 additions & 5 deletions src/soil_compression_geospatial_inputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ for (i in 1:n_cells) {
ex <- extent(cell)

# Take a random sample of n points from the 50 km cell
rs <- SpatialPoints(data.frame(
x = sample(ex[1]:ex[2], n_samp, replace = T),
y = sample(ex[3]:ex[4], n_samp, replace = T)
),
proj4string = crs(cell)
rs <- SpatialPoints(
data.frame(
x = sample(ex[1]:ex[2], n_samp, replace = T),
y = sample(ex[3]:ex[4], n_samp, replace = T)
),
proj4string = crs(cell)
)

# extract the cultivated layer to get fraction of cell cultivated
Expand Down

0 comments on commit 6c90618

Please sign in to comment.