2016-07-20 8 views
2

다양한 프로젝트에서 사용하는 도우미 기능이있는 개인 R 패키지가 있습니다. 그러나 프로젝트의 특정 버전을 사용하여 코드를 추가하고 싶습니다. 내가 지점들과 함께이 일을 할 수 있다는 것을 이해하지만, 나는 커밋 (commit) 태그들로 그것을하고 싶다.R 패키지의 특정 태그 지정된 커밋을 설치하는 방법

devtools::install_git에 대한 설명서를 보면 커밋에 태그를 추가하면 해당 커밋을 설치할 수 있지만 저에게는 적합하지 않은 것으로 보입니다.

devtools::install_git(url = 'http://<username>@<company stash url>/scm/preamp.git', branch = 'v0.0.1') 

# > Downloading git repo http://<username>@<company stash url>/scm/preamp.git 
# > Error in .local(object, ...) : 'v0.0.1' did not match any branch 

내 R 세션 정보 :

이 사진은 내가 태그 커밋 것을 "v0.0.1" enter image description here

을 보여주는 그러나 설치하려고하는 것은 저에게이 있습니다

> sessionInfo() 
R version 3.2.3 (2015-12-10) 
Platform: x86_64-apple-darwin13.4.0 (64-bit) 
Running under: OS X 10.11.1 (El Capitan) 

locale: 
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 

attached base packages: 
[1] parallel splines stats  graphics grDevices utils  datasets methods base  

other attached packages: 
[1] tidyr_0.5.1     lazyeval_0.2.0    assertthat_0.1    
[4] beepr_1.2     preamp_0.1     stringr_1.0.0    
[7] readr_0.2.2     lubridate_1.5.6    xgboost_0.4-3    
[10] magrittr_1.5    dplyr_0.5.0     jsonlite_1.0    
[13] httr_1.2.1     rvdata_0.1.0    RODBC_1.3-12    
[19] XML_3.98-1.4    reshape2_1.4.1    ggplot2_2.1.0    
[22] DT_0.1      infotheo_1.2.0    RMySQL_0.10.9    
[25] ROCR_1.0-7     gplots_2.17.0    gtools_3.5.0    
[28] gbm_2.1.1     lattice_0.20-33    survival_2.38-3    
[31] plyr_1.8.4     sqldf_0.4-10    RSQLite_1.0.0    
[34] DBI_0.4-1     gsubfn_0.6-6    proto_0.3-10    
[37] coreFunctions_0.1.0   devtools_1.10.0    

loaded via a namespace (and not attached): 
[1] tcltk_3.2.3  colorspace_1.2-6 htmltools_0.3.5 chron_2.3-47  withr_1.0.1  
[6] audio_0.1-5  munsell_0.4.3  gtable_0.2.0  caTools_1.17.1  htmlwidgets_0.6 
[11] memoise_1.0.0  curl_0.9.7   Rcpp_0.12.5  KernSmooth_2.23-15 scales_0.4.0  
[16] gdata_2.17.0  digest_0.6.9  stringi_1.1.1  grid_3.2.3   tools_3.2.3  
[21] bitops_1.0-6  tibble_1.1   Matrix_1.2-3  data.table_1.9.6 R6_2.1.2   
[26] git2r_0.13.1 
+0

아직도 궁금해? – Moderat

답변

0

그 스크린 샷에서 패키지가 GitHub에있을 수 있습니다. install_github을 사용하여 특정 패키지 릴리스를 설치할 수 있었습니까? 이 함수에서는과 같이, ref와 커밋/태그/지점을 지정 사람이 여기에 어떤 통찰력이있는 경우

> library(devtools) 
> install_github("hadley/lubridate", ref = "v1.6.0") 
Using GitHub PAT from envvar GITHUB_PAT 
Downloading GitHub repo hadley/[email protected] 
from URL https://api.github.com/repos/hadley/lubridate/zipball/v1.6.0 
Installing lubridate 
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \ 
    '/private/var/folders/0w/prb4hnss2gn1p7y34qb2stw00000gp/T/RtmpZcDif6/devtools3b442dfebb82/hadley-lubridate-d986d4b' \ 
    --library='/Library/Frameworks/R.framework/Versions/3.3/Resources/library' --install-tests 

* installing *source* package ‘lubridate’ ... 
** libs 
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c datetime.c -o datetime.o 
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c period.c -o period.o 
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c tparse.c -o tparse.o 
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c utils.c -o utils.o 
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o lubridate.so datetime.o period.o tparse.o utils.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation 
installing to /Library/Frameworks/R.framework/Versions/3.3/Resources/library/lubridate/libs 
** R 
** data 
*** moving datasets to lazyload DB 
** inst 
** tests 
** preparing package for lazy loading 
** help 
*** installing help indices 
** building package indices 
** installing vignettes 
** testing if installed package can be loaded 
* DONE (lubridate)