Skip to content

Commit

Permalink
git
Browse files Browse the repository at this point in the history
  • Loading branch information
jinseob2kim committed Feb 17, 2022
1 parent 65d582a commit b0979a8
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ R 은 단순한 통계프로그램이 아닌 데이터분석 전 과정을 포

|회차| 날짜 | 주제 |
|---|---|---|
|1| 2월 21일 | 강의계획안내, [깃허브(github)](https://carpentries.github.io/sandpaper-docs/github-pat.html), [공공의료빅데이터 소개](lecture/공단데이터소개.pdf) |
|1| 2월 21일 | 강의계획안내, [깃허브(github)](code/github.R), [공공의료빅데이터 소개](lecture/공단데이터소개.pdf) |
|2| 2월 28일 | R 데이터 매니지먼트 [base](https://blog.zarathu.com/posts/2020-02-16-rdatamanagement-basic), [code](code/base.R) |
|3| 3월 7일| R 데이터 매니지먼트 최근: [tidyverse](https://jinseob2kim.github.io/lecture-snuhlab/tidyverse) |
|4| 3월 14일| R 데이터 매니지먼트: [data.table](https://blog.zarathu.com/posts/2022-02-11-datatable/) |
Expand Down Expand Up @@ -62,5 +62,5 @@ R 은 단순한 통계프로그램이 아닌 데이터분석 전 과정을 포
아래 패키지들을 미리 설치하면 좋다.

```r
install.packages(c("data.table", "magrittr", "fst", "ggplot2", "ggpubr", "officer", "rvg", "tableone", "gtsummary", "MatchIt", "twang"))
install.packages(c("data.table", "magrittr", "fst", "ggplot2", "ggpubr", "officer", "rvg", "tableone", "gtsummary", "MatchIt", "twang", "usethis", "gitcreds"))
```
47 changes: 47 additions & 0 deletions code/github.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#### 1. Sign up at GitHub.com ################################################

## If you do not have a GitHub account, sign up here:
## https://github.com/join

# ----------------------------------------------------------------------------

#### 2. Install git ##########################################################

## If you do not have git installed, please do so:
## Windows -> https://git-scm.com/download/win
## Mac -> https://git-scm.com/download/mac
## Linux -> https://git-scm.com/download/linux
## or: $ sudo dnf install git-all

# ----------------------------------------------------------------------------

### 3. Configure git with Rstudio ############################################

## set your user name and email:
#install.packages(c("usethis", "gitcreds"))
usethis::use_git_config(user.name = "jinseob Kim", user.email = "[email protected]")

## create a personal access token for authentication:
usethis::create_github_token()
## in case usethis version < 2.0.0: usethis::browse_github_token() (or even better: update usethis!)

## Copy and paste your token and press enter
gitcreds::gitcreds_set()

# ----------------------------------------------------------------------------

#### 4. Restart R! ###########################################################

# ----------------------------------------------------------------------------

#### 5. Verify settings ######################################################

usethis::git_sitrep()

## Your username and email should be stated correctly in the output.
## Also, the report shoud cotain something like:
## 'Personal access token: '<found in env var>''

# ----------------------------------------------------------------------------

## THAT'S IT!

0 comments on commit b0979a8

Please sign in to comment.