Skip to content

Commit

Permalink
Update sf and terra [patch]
Browse files Browse the repository at this point in the history
  • Loading branch information
gmyenni committed Apr 11, 2024
1 parent aa4098d commit 7e47a42
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DataCleaningScripts/update_ndvi.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ create_portal_area <- function(centroid = c(-109.08029, 31.937769),
#transform to NAD83(NSRS2007)/California Albers
center_transform <- sf::st_as_sf(center) %>% sf::st_transform(3488)
portal_area_transform <- suppressWarnings(as(sf::st_buffer(center_transform, 1000, ), 'Spatial'))
portal_area <- sf::st_transform(portal_area_transform, sf::st_crs("+proj=utm +zone=12
portal_area <- sp::spTransform(portal_area_transform, sp::CRS("+proj=utm +zone=12
+datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0 "))
return(portal_area)

Expand Down
39 changes: 28 additions & 11 deletions install-packages.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
# Install pacman if it isn't already installed

if ("pacman" %in% rownames(installed.packages()) == FALSE) install.packages("pacman")

remove.packages("stringi")
remove.packages("stringr")
install.packages(c("Rcpp","stringi","stringr","RCurl","curl","Hmisc", "EML", "sf","rgdal","lwgeom", "git2r","remotes"), type="source", repos="https://cran.rstudio.com")
install.packages(c("curl",
"EML",
"git2r",
"Hmisc",
"lwgeom",
"Rcpp",
"RCurl",
"remotes",
"rgdal",
"stringi",
"stringr",
"sf"), type="source", repos="https://cran.rstudio.com")
install.packages('terra', repos='https://rspatial.r-universe.dev')
remotes::install_github("htmltab/htmltab")

# Install analysis packages using pacman
if ("pacman" %in% rownames(installed.packages()) == FALSE) install.packages("pacman")

# pacman::p_load(units, sf, rgdal, lwgeom, shiny, stringi, stringr, Hmisc, dplyr, git2r, openxlsx, lubridate, htmltab,
# lunar, jsonlite, devtools, sp, sqldf, raster, RCurl, EML, testthat, zoo, tidyr, semver, yaml)


pacman::p_load(units, shiny, dplyr, openxlsx, lubridate, htmltab,
lunar, jsonlite, devtools, sp, sqldf, raster, testthat, zoo, tidyr, semver, yaml)
pacman::p_load(devtools,
dplyr,
jsonlite,
lubridate,
lunar,
openxlsx,
semver,
shiny,
sp,
sqldf,
testthat,
tidyr,
units,
yaml,
zoo)

0 comments on commit 7e47a42

Please sign in to comment.