2ghinstallpackagesghsuggestusername6ghupdatepackagelist6recommenddependencies7removecon3ictrepos7selectrepository8separateintopackageandreference8Index10ghinstallpackagesInstallPackagesfromGitHubDescr ID: 864117
Download Pdf The PPT/PDF document "PackagegithubinstallFebruary182018TypePa..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
1 Package`githubinstall'February18,2018Typ
Package`githubinstall'February18,2018TypePackageVersion0.2.2TitleAHelpfulWaytoInstallRPackagesHostedonGitHubDescriptionProvidesanhelpfulwaytoinstallpackageshostedonGitHub.URLhttps://github.com/hoxo-m/githubinstallBugReportshttps://github.com/hoxo-m/githubinstall/issuesLicenseMIT+leLICENSEImportscurl,data.table,devtools,httr,jsonlite,mockery,utilsRoxygenNote6.0.1EncodingUTF-8Suggeststestthat,knitr,rmarkdownVignetteBuilderknitrNeedsCompilationnoAuthorKojiMakiyama[cre,aut],AtsushiHayakawa[ctb],ShinyaUryu[ctb],HiroakiYutani[ctb],NagiTeramo[ctb],KazuhiroMaeda[ctb]MaintainerKojiMakiyamahoxo;.smi;le@g;mail;.com;RepositoryCRANDate/Publication2018-02-1817:56:31UTCRtopicsdocumented:gh_install_packages.....................................2gh_list_packages.................................
2 .....3gh_search_packages................
.....3gh_search_packages....................................4gh_show_source.......................................4gh_suggest.........................................51 2gh_install_packagesgh_suggest_username....................................6gh_update_package_list...................................6recommend_dependencies.................................7remove_conict_repos...................................7select_repository......................................8separate_into_package_and_reference...........................8Index10 gh_install_packagesInstallPackagesfromGitHub DescriptionInstallPackagesfromGitHubUsagegh_install_packages(packages,ask=TRUE,ref="master",build_vignettes=FALSE,dependencies=NA,verbose=TRUE,quiet=!verbose,lib=NULL,...)githubinstall(packages,ask=TRUE,ref="master",
3 build_vignettes=FALSE,dependencies=NA,ve
build_vignettes=FALSE,dependencies=NA,verbose=TRUE,quiet=!verbose,lib=NULL,...)Argumentspackagescharactervectorofthenamesofthepackages.Youcanspecifyrefargument(seebelow)usingpackage_name[@ref|#pull].Ifbotharespecied,theval-uesinrepotakeprecedence.asklogical.Indicatesasktoconrmbeforeinstall.refcharactervector.Desiredgitreference.Couldbeacommit,tag,orbranchname,oracalltogithub_pull.Defaultsto"master".build_vignetteslogical.IfTRUE,willbuildvignettes.dependencieslogical.Indicatingtoalsoinstalluninstalledpackageswhichthepackagesde-pendson/linksto/suggests.Seeargumentdependenciesofinstall.packages.verboselogical.Indicatingtoprintdetailsofpackagebuildingandinstallation.DfaultisTRUE.quietlogical.Notverbose.libcharactervectorgivingthelibrarydirectorieswheretoinstallthepackages.Re-cycledasneeded.D
4 efaultstotherstelementof.libPaths().
efaultstotherstelementof.libPaths()....additionalargumentstocontrolinstallationofpackage,passedtoinstall_github. gh_list_packages3Detailsgithubinstall()isanaliasofgh_install_packages().ValueTRUEifsuccess.Examples##Notrun:gh_install_packages("AnomalyDetection")githubinstall("AnomalyDetection")##End(Notrun) gh_list_packagesGetInformationofPackagesonGitHub DescriptionGetInformationofPackagesonGitHubUsagegh_list_packages(username=NULL)ArgumentsusernameacharactervectorasGitHubusername.IfyousetNULL(default),itreturnsallpackagesinformation.Valueadata.framethathasauthor,packagenameandtitle.Examples##Notrun:gh_list_packages("hadley")##End(Notrun) 4gh_show_source gh_search_packagesSearchPackagesfromTitlesbyRegularExpressions DescriptionSearchPackagesfromTitlesbyRegularExpressionsUsagegh_search_package
5 s(regex,ignore.case=TRUE)Argumentsregexa
s(regex,ignore.case=TRUE)Argumentsregexacharacterstringcontainingaregularexpressiontobematchedinthepackagetitles.ignore.caselogical.IfFALSE,thepatternmatchingiscasesensitiveandifTRUE,caseisignoredduringmatching.Valueadata.frameofpackageinformation.Examples##Notrun:gh_search_packages("lasso")##End(Notrun) gh_show_sourceFindsourcecodeforfunctionsinpackagesonGitHub DescriptionFindsourcecodeforfunctionsinpackagesonGitHubUsagegh_show_source(func,repo=NULL,browser=getOption("browser"))Argumentsfuncafunctionoracharacterstring.Afunctionname.repoacharacterstring.AGitHubrepositorynamethatmustnotbeexactry.browseracharacterstringgivingthenameoftheprogramtobeusedastheHTMLbrowser. gh_suggest5Examples##Notrun:gh_show_source("mutate","dplyr")library(dplyr)gh_show_source(mutate)##End(Notrun) gh_suggestSuggestGit
6 hubRepositoryfromaIncompleteName Descrip
hubRepositoryfromaIncompleteName DescriptionSuggestGithubRepositoryfromaIncompleteNameUsagegh_suggest(repo_name,keep_title=FALSE)Argumentsrepo_nameacharacter.Apartofarepositoryname.keep_titlelogical.Indicatestokeepthepackagetitlesasanattrbite.DefaultFALSE.Valuecandidatesfortherepositoryname.Examplesgh_suggest("AnomalyDetection")#[1]"twitter/AnomalyDetection"gh_suggest("BnomalyDetection")#[1]"twitter/AnomalyDetection"gh_suggest("uwitter/BnomalyDetection")#[1]"twitter/AnomalyDetection" 6gh_update_package_list gh_suggest_usernameSuggestGithubUsernamefromaFaintMemory DescriptionSuggestGithubUsernamefromaFaintMemoryUsagegh_suggest_username(vague_name)Argumentsvague_nameacharacter.GitHubusernamethatmaynotbeexact.DetailsThetroubleisthattheusernamesofGitHubareoftenhardtoremember.Thefunctionprovidesawayt
7 oobtainusernamesfromafaintmemory.Valueac
oobtainusernamesfromafaintmemory.Valueacharactervectoroftheclosestusernamestoinput.Examples##Notrun:gh_guess_username("yuhui")#[1]"yihui"##End(Notrun) gh_update_package_listUpdatetheListofPackagesonGitHub. DescriptionUpdatetheListofPackagesonGitHub.Usagegh_update_package_list() recommend_dependencies7 recommend_dependenciesThedefault"dependencies"isNAthatmeansc("Depends","Imports","LinkingTo").If"build_vignettes"isTRUE,theinstallneeds"Sug-gests"dependencyinmanycases.Sowerecommendinsuchcasetoset"dependencies"toTRUEthatmeansc("Depends","Imports","LinkingTo","Suggests"). DescriptionThedefault"dependencies"isNAthatmeansc("Depends","Imports","LinkingTo").If"build_vignettes"isTRUE,theinstallneeds"Suggests"dependencyinmanycases.Sowerecommendinsuchcasetoset"dependencies"toTRUEthatmeansc("Depends","Impor
8 ts","LinkingTo","Suggests").Usagerecomme
ts","LinkingTo","Suggests").Usagerecommend_dependencies(ask,build_vignettes,dependencies,quiet)Argumentsasklogical.Indicatesasktoconrmbeforeinstall.build_vignetteslogical.IfTRUE,willbuildvignettes.dependencieslogical.Indicatingtoalsoinstalluninstalledpackageswhichthepackagesde-pendson/linksto/suggests.Seeargumentdependenciesofinstall.packages.quietlogical.Notverbose. remove_conflict_reposWewanttodetectthetwoconictcasesaslows:1.ThepackageisalreadyinstalledfromsomerepositorylikeCRANthatisnotGitHub.2.ThepackageisalreadyinstalledfromGtiHubbuttheusernamediffers.Intheabovecases,weaskwhethertooverwriteitandremovefrom"repo"iftheanswerisno. DescriptionIf"quiet"isTRUE,weoverwriteallpackagesforciblyandsilently.Elseif"quiet"isFALSEand"ask"isTRUE,weaskwhethertooverwriteit.(Default)Elseif"quiet"is
9 FALSEand"ask"isFALSE,wemessagetooverwrit
FALSEand"ask"isFALSE,wemessagetooverwriteitanddoit.Usageremove_conflict_repos(repos,lib,quiet,ask) 8separate_into_package_and_referenceArgumentsreposcharactorvectoroffullGitHubrepositorynames.libcharactervectororNULL.quietlogical.asklogical. select_repositorySuggestcandidatesfrom"package_name"andmakeuserselectedoneofthem. DescriptionSuggestcandidatesfrom"package_name"andmakeuserselectedoneofthem.Usageselect_repository(package_name)Argumentspackage_nameacharacterstring.ApackagenameorfullGitHubrepositoryname.Valuecandidatewithtitle separate_into_package_and_referenceThe"repo"argumentallowstocontain"ref"as"package_name@ref","package_name#pull"or"package_name[branch]".Thefunctionde-tectsthat"repo"contains"ref"andseparatesintopurerepoandref.If"repo"contains"ref"and"ref"argumentisspecied,thevalues
10 in"repo"takeprecedence. DescriptionThe"r
in"repo"takeprecedence. DescriptionThe"repo"argumentallowstocontain"ref"as"package_name@ref","package_name#pull"or"package_name[branch]".Thefunctiondetectsthat"repo"contains"ref"andseparatesintopurerepoandref.If"repo"contains"ref"and"ref"argumentisspecied,thevaluesin"repo"takeprecedence.Usageseparate_into_package_and_reference(packages,original_ref) separate_into_package_and_reference9Argumentspackages"repo"argument.original_ref"ref"argument. Index.libPaths,2gh_install_packages,2gh_list_packages,3gh_search_packages,4gh_show_source,4gh_suggest,5gh_suggest_username,6gh_update_package_list,6github_pull,2githubinstall(gh_install_packages),2install.packages,2,7install_github,2recommend_dependencies,7regularexpression,4remove_conflict_repos,7select_repository,8separate_into_package_and_reference,8