私はHadley Wickham's guide to create packagesに従おうとしていますが、手順を正確に実行した後にエラーが発生しています。私は他の多くの人が間違いなくそうすることができたことを知っているので、私はどのように進むべきか不明です。ここで私のdevtoolsにhas_devel()関数がないのはなぜですか?
は、これまで私の入力と出力です:
> install.packages(c("devtools", "roxygen2", "testthat", "knitr"))
Installing packages into ‘C:/Users/jerem/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘git2r’
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/git2r_0.19.0.zip'
Content type 'application/zip' length 3026420 bytes (2.9 MB)
downloaded 2.9 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/devtools_1.13.3.zip'
Content type 'application/zip' length 443739 bytes (433 KB)
downloaded 433 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/roxygen2_6.0.1.zip'
Content type 'application/zip' length 756869 bytes (739 KB)
downloaded 739 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/testthat_1.0.2.zip'
Content type 'application/zip' length 1057803 bytes (1.0 MB)
downloaded 1.0 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/knitr_1.17.zip'
Content type 'application/zip' length 1027379 bytes (1003 KB)
downloaded 1003 KB
package ‘git2r’ successfully unpacked and MD5 sums checked
package ‘devtools’ successfully unpacked and MD5 sums checked
package ‘roxygen2’ successfully unpacked and MD5 sums checked
package ‘testthat’ successfully unpacked and MD5 sums checked
package ‘knitr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\jerem\AppData\Local\Temp\Rtmpeuw2OQ\downloaded_packages
> install.packages("rstudioapi")
Installing package into ‘C:/Users/jerem/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rstudioapi_0.7.zip'
Content type 'application/zip' length 129765 bytes (126 KB)
downloaded 126 KB
package ‘rstudioapi’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\jerem\AppData\Local\Temp\Rtmpeuw2OQ\downloaded_packages
> rstudioapi::isAvailable("0.99.149")
[1] TRUE
> devtools::install_github("hadley/devtools")
Downloading GitHub repo hadley/[email protected]
from URL https://api.github.com/repos/hadley/devtools/zipball/master
Installing devtools
Downloading GitHub repo rstudio/[email protected]
from URL https://api.github.com/repos/rstudio/rstudioapi/zipball/master
Installing rstudioapi
"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/jerem/AppData/Local/Temp/Rtmpeuw2OQ/devtools9c45cf312b/rstudio-rstudioapi-8e8bfb0" \
--library="C:/Users/jerem/Documents/R/win-library/3.4" --install-tests
* installing *source* package 'rstudioapi' ...
** R
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (rstudioapi)
"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/jerem/AppData/Local/Temp/Rtmpeuw2OQ/devtools9c42002296c/hadley-devtools-a0c8d73" \
--library="C:/Users/jerem/Documents/R/win-library/3.4" --install-tests
* installing *source* package 'devtools' ...
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (devtools)
すべてはここまでうまくいっているようだが、ここで分解します。
> library(devtools)
Loading required package: usethis
> has_devel()
Error in has_devel() : could not find function "has_devel"
追加情報:
私のパス:デベロッパーツールの
Sys.getenv( "PATH")
[1] "C:\\Program Files\\R\\R-3.4.1\\bin\\x64;c:\\Rtools\\bin;c:\\Rtools\\mingw_32\\bin;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Users\\jerem\\AppData\\Local\\Microsoft\\WindowsApps;"
内容:
LS(POS = "パッケージ:デベロッパーツール")
1 "add_path" "as.package" "bashの" "構築"
[5] "build_manual" "build_vignettes"「build_win "
[9] "check_built" "check_cran" "check_dep_version" "check_failures"
[13] "check_man" "clean_dll" "clean_vignettes" を "チェック""
[17] "create_description" "dev_mode" を "作成" dev_package_deps "" dev_packages "
[21] "devtest" "文書" "dr_devtools" "dr_github"
[25] "GET_PATH" "github_pat" "github_pull" "github_release"
[29] "has_tests" "インストール" "install_bioc"「install_bitbucket "
[33] "install_cran" "install_deps" "install_dev_deps" "install_git"
[37] "install_github" "install_local" "install_svn" "install_url"
[41] "install_versionは"" です。パッケージ」 "糸くず" "load_all"
[45] "loaded_packages" "missing_s3" "on_path" "package_deps"
[49] "PACKAGE_FILE" "parse_deps" "r_env_vars" ""
[53] "release_checks解放" "あるrevdep" "revdep_check" を "リロード"
[57] "revdep_check_print_problems" "revdep_check_reset" "revdep_check_resume" "revdep_check_save_summary"
[61] "revdep_email" "revdep_maintainers" "rhub_check" "run_examples"
[65]「session_info "set_path" "setup" "show_news"
[69] "source_gist" "source_url" "spell_check" "submit_cran"
[73] "SYSTEM_CHECK" "system_output" "テスト" ""
[77] "アンロード" "update_packages" アンインストール "use_appveyor" "use_build_ignore"
[81] "use_code_of_conduct" "use_coverage" "use_cran_badge"「use_cran_comments "
[85] "use_data" "use_data_raw" "use_dev_version" "use_git"
[89] "use_git_hook" "use_github" "use_github_links" "use_gpl3_license"
[93] "use_mit_license" "use_news_md" "use_package"" use_package_doc "
[97]" use_rcpp "" use_readme_md "" use_readme_rmd "" use_revdep "
[101] "use_rstudio" "use_test" "use_testthatは" ""
[105] "use_vignette" "uses_testthat" "WD" "with_debug" をuse_travis
Iはhas_devel機能を使用できるように、私は何を変更すべきです?
私は同じ問題がありました。 https://github.com/hadley/devtools/issues/1219を参照して、まず 'find_rtools()'を実行してください。 –