create
create.Rmd
Creating a gerp
projects
There are two functions for creating a new gerp
project:
ger_proj()
and ger_create()
.
ger_proj()
The quickest way to create a new gerp
project is with
gerp::ger_proj()
.
- First you need to install the package from GitHub.
install.packages("remotes")
remotes::install_github("mjfrigaard/gerp")
- Then enter the following in your R Console pane:
gerp::ger_proj()
You’ll see the following:
New gerp
projects created with
gerp::ger_proj()
will automatically place the new project
on your Desktop or some other conspicuous location. (1)
ger_create()
The ger_create()
function assumes you’ve navigated to
your project folder and have the path in a quoted text string (i.e,
"/Users/mjfrigaard/projects/"
). If you need help locating a
home for your R projects, check out the Folder
paths vignette.
- Locate or create your R projects folder. You can store the output in
a variable (
pth
) and pass it to thefolder
argument ingerp::ger_create()
(or pass the full path in quotes).
pth <- gerp::ger_path("/Users/mjfrigaard/projects/")
gerp::ger_create(
folder = pth,
name = "my project")
- After running
gerp::ger_create()
, a new ‘good enough’ R project will open in a new session:
.Rproj
files
gerp
projects use RStudio’s project files (with
extension .Rproj
). .Rproj
files “contain
project options and can also be used as a shortcut for opening the
project directly from the filesystem.”.(2)
When I want to re-open my RStudio project, I navigate to the
.Rproj
file and double-click on it to open RStudio:
gerp::ger_proj()
use theusethis::use_course()
function to download the zip file.If you’re already using a cloud platform like Dropbox or Google Drive to keep track of your files, choose a different location for your R project folders. Cloud storage services are great, but they’ve been known to cause issues when working with R and RStudio.