2ghinstallpackagesghsuggestusername6ghupdatepackagelist6recommenddependencies7removecon ID: 823602
Download Pdf The PPT/PDF document "Package`githubinstall'February18,2018Typ..." 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.
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.................................
.....3gh_search_packages................
.....3gh_search_packages....................................4gh_show_source.......................................4gh_suggest.........................................512gh_install_packagesgh_suggest_username....................................6gh_update_package_list...................................6recommend_dependencies.................................7remove_conict_repos...................................7select_repository......................................8separate_into_package_and_reference...........................8Index10gh_install_packagesInstallPackagesfromGitHubDescriptionInstallPackagesfromGitHubUsagegh_install_packages(packages,ask=TRUE,ref="master",build_vignettes=FALSE,dependencies=NA,verbose=TRUE,quiet=!verbose,lib=NULL,...)githubinstall(packages,ask=TRUE,ref="master",
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
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_packagesGetInformationofPackagesonGitHubDescriptionGetInformationofPackagesonGitHubUsagegh_list_packages(username=NULL)ArgumentsusernameacharactervectorasGitHubusername.IfyousetNULL(default),itreturnsallpackagesinformation.Valueadata.framethathasauthor,packagenameandtitle.Examples##Notrun:gh_list_packages("hadley")##End(Notrun)4gh_show_sourcegh_search_packagesSearchPackagesfromTitlesbyRegularExpressionsDescriptionSearchPackagesfromTitlesbyRegularExpressionsUsagegh_search_package
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_sourceFindsourcecodeforfunctionsinpackagesonGitHubDescriptionFindsourcecodeforfunctionsinpackagesonGitHubUsagegh_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
hubRepositoryfromaIncompleteNameDescrip
hubRepositoryfromaIncompleteNameDescriptionSuggestGithubRepositoryfromaIncompleteNameUsagegh_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_listgh_suggest_usernameSuggestGithubUsernamefromaFaintMemoryDescriptionSuggestGithubUsernamefromaFaintMemoryUsagegh_suggest_username(vague_name)Argumentsvague_nameacharacter.GitHubusernamethatmaynotbeexact.DetailsThetroubleisthattheusernamesofGitHubareoftenhardtoremember.Thefunctionprovidesawayt
oobtainusernamesfromafaintmemory.Valueac
oobtainusernamesfromafaintmemory.Valueacharactervectoroftheclosestusernamestoinput.Examples##Notrun:gh_guess_username("yuhui")#[1]"yihui"##End(Notrun)gh_update_package_listUpdatetheListofPackagesonGitHub.DescriptionUpdatetheListofPackagesonGitHub.Usagegh_update_package_list()recommend_dependencies7recommend_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
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
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.Valuecandidatewithtitleseparate_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
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