R package for the Snapshot Wisconsin Decision Support Team
You can install the development version of sswids from GitHub with:
# install.packages("devtools")
devtools::install_github("SnapshotWisconsin/sswids", build_vignettes = TRUE)Including build_vignettes = TRUE is the only way the vignette is included and accessible via the utils::browseVignettes() or vignettes() functions.To render vignette use 1 of the 2 functions below.
My suggestion would be browsevignettes("sswids") as it renders it in internet window instead of within
Rstudio help window.
# open vignettes
browseVignettes("sswids")
vignette("DataPullTutorial")- On GitHub repo, go to Code tab and copy URL
- Open RStudio > File > New Project > Version Control > Git
- Paste repo URL and browse to directory where you want to clone the package on your computer
- Click on
.projfile to open project in RStudio in the future
- Load
devtools - Create new function:
use_r('new_function_name') - Write function in new R script that pops up
- Click somewhere inside function, then go to Code > Insert Roxygen Skeleton to add documentation
- Save R script
- Check the function is working, use
load_all()to do tests with function right away - Run
check()to make sure there are no errors - Run
document()to make sure documentation is updated
- Click on
Gittab - Click
Stagedbox next to new or modified file - Click
Commit - Enter commit message
- Click
Push
Then update R package by first removing with remove.packages() or devtools::install_github("SnapshotWisconsin/sswids", force = TRUE)
- Open
data-raw/make_spatial_data.R - Grab DNR GIS files using
arcpullrpackage or drop shapefiles intodata-raw - Copy
OAS/Winiarski/snapshot/sswids_gisintoC:/sswids_gisto access large shapefiles/rasters