-
Notifications
You must be signed in to change notification settings - Fork 32
/
README.Rmd
80 lines (56 loc) · 2.71 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
```{r settings,echo=FALSE, include=FALSE}
className <- 'LearningR'
```
# Live Training
This is an empty repo for to initialize an R project for training courses organized by [Lander Analytics](www.landeranalytics.com).
# Packages
To get started run the following code to install the latest version of the necessary packages.
```{r install.packages,eval=FALSE}
packages <- c('caret', 'coefplot','DBI', 'dbplyr', 'doParallel', 'foreach',
'ggthemes', 'glmnet', 'jsonlite', 'leaflet', 'odbc',
'recipes', 'rmarkdown', 'rprojroot', 'RSQLite', 'rvest',
'tidyverse', 'threejs', 'usethis', 'UsingR', 'xgboost', 'XML',
'xml2')
install.packages(packages)
```
# Project Structure
Making use of RStudio projects greatly improves the user experience. To facilitate this users should run the following code which will recreate this package on their computer. Be sure to select the positive prompts such as `yes`, `yeah`, etc.
```{r download-project,eval=FALSE}
newProject <- usethis::use_course('https://github.com/jaredlander/LearningR/archive/master.zip')
```
After that runs successfully you will have a new folder holding the R project that looks like this.
```{r proj-folder,echo=FALSE}
knitr::include_graphics('images/ProjectFolder.png')
```
If a new project did not open automatically, either double-click the file called `r sprintf('%s.Rproj', className)` or run the following line of code.
```{r open-project,eval=FALSE}
rstudioapi::openProject(newProject)
```
After running this code, or double-clicking that file, you will be in an RStudio Project called `r className`. You can see this in the top right of RStudio.
```{r proj-corner,echo=FALSE}
knitr::include_graphics('images/ProjectCorner.png')
```
## Clone this Repo
Alternatively, if you use git then please clone this repo then open it as an [RStudio Project](https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects).
```{sh eval=FALSE}
# if using SSH
git clone [email protected]:jaredlander/LearningR.git
# if using https
git clone https://github.com/jaredlander/LearningR.git
```
# Data
Data for the class is kept at [data.world](https://data.world/landeranalytics/training). You can sign up for a free account or run the following code. This requires that you are using an [RStudio Project](https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects) setup exactly like this repo, which is done if you followed the preceding code.
```{r source-data-file,eval=FALSE}
source('prep/DownloadData.r')
```