devtools

testthat fails within devtools::check but works in devtools::test

孤者浪人 提交于 2019-12-01 04:07:39
Is there any way to reproduce the environment which is used by devtools::check ? I have the problem that my tests work with devtools::test() but fail within devtools::check() . My problem is now, how to find the problem. The report of check just prints the last few lines of the error log and I can't find the complete report for the testing. checking tests ... ERROR Running the tests in ‘tests/testthat.R’ failed. Last 13 lines of output: ... I know that check uses a different environment compared to test but I don't know how I should debug these problems since they are not reproducible at all.

error setting certificate verify locations, install_github

倾然丶 夕夏残阳落幕 提交于 2019-12-01 04:00:41
I am trying to install a package from github, but I keep getting an error when I use install_github . library(devtools) install_github(repo="swirl", username="ncarchedi") Installing github repo(s) swirl/master from ncarchedi Downloading swirl.zip from https://github.com/ncarchedi/swirl/archive/master.zip Error in function (type, msg, asError = TRUE) : error setting certificate verify locations: CAfile: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RCurl/CurlSSL/cacert.pem CApath: none I have tried to install several different packages (including an updated version of ggmap),

devtools::install_git Over SSH

こ雲淡風輕ζ 提交于 2019-12-01 03:25:45
I've written an R package that I keep in a (bare) git repository on an SSH server, and I want to be able to install it on a local machine without needing to clone the repository by hand. I've attempted the following: devtools::install_git("ssh://user_name@remote/path/to/repository") but I get the error Downloading git repo ssh://user_name@remote/path/to/repository Error in git2r::clone(x$url, bundle, progress = FALSE) : Error in 'git2r_clone': Failed to start SSH session: Unable to exchange encryption keys I'm on a Windows 7 machine, using R 3.1.2, git2r version 0.11.0 and devtools version 1.9

testthat fails within devtools::check but works in devtools::test

柔情痞子 提交于 2019-12-01 02:28:54
问题 Is there any way to reproduce the environment which is used by devtools::check ? I have the problem that my tests work with devtools::test() but fail within devtools::check() . My problem is now, how to find the problem. The report of check just prints the last few lines of the error log and I can't find the complete report for the testing. checking tests ... ERROR Running the tests in ‘tests/testthat.R’ failed. Last 13 lines of output: ... I know that check uses a different environment

“Could not find function” in Roxygen examples during CMD check

早过忘川 提交于 2019-12-01 02:19:19
问题 I'm running a CMD check on a package in RStudio, part of which analyses the @examples in the inline Roxygen documentation. I'm getting this error: checking examples ... ERROR Running examples in ‘packagename-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: checkDate > ### Title: Ensure that a date string is a valid date > ### Aliases: checkDate > > ### ** Examples > > checkDate("2017-05-06") Error: could not find function

error setting certificate verify locations, install_github

巧了我就是萌 提交于 2019-12-01 01:50:18
问题 I am trying to install a package from github, but I keep getting an error when I use install_github . library(devtools) install_github(repo="swirl", username="ncarchedi") Installing github repo(s) swirl/master from ncarchedi Downloading swirl.zip from https://github.com/ncarchedi/swirl/archive/master.zip Error in function (type, msg, asError = TRUE) : error setting certificate verify locations: CAfile: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RCurl/CurlSSL/cacert.pem

Cannot install IRkernel with install_github(): Git not installed?

旧时模样 提交于 2019-11-30 21:14:26
I was trying to get R working with the Jupyter Notebook on my Windows machine. I followed the IRkernel tutorial . However, I can't install the GitHub repository, I always get the error install_github("IRkernel/IRkernel") Downloading GitHub repo IRkernel/IRkernel@master Error: Git does not seem to be installed on your system. The devtools package (2.0.1) is installed. install_github also works for example with install_github("StatsWithR/statsr") (Coursera package) (although the devtools package is not even loaded?). Not sure how to deal with the problem, any ideas? Is my devtools package broken

No vignettes found by browseVignettes where they actually are there

醉酒当歌 提交于 2019-11-30 13:04:32
I have a package on a github repository with 2 vignettes in the vignettes/ directory. I tried to download if with devtools package like this > if (!require(devtools)) { + install.packages("devtools") + require(devtools) + } > install_github("MarcinKosinski/RTCGA", build_vignettes=TRUE) Downloading github repo MarcinKosinski/RTCGA@master Installing RTCGA "D:/R-32~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL \ "C:/Users/Marcin/AppData/Local/Temp/Rtmpg1Kbfy/devtools3cf47f1f6731/MarcinKosinski-RTCGA-0d91d7c" \ --library="C:/Users/Marcin/Documents/R/win-library/3.2"

How to extend S3 method from another package without loading the package

。_饼干妹妹 提交于 2019-11-30 11:35:12
I am developing a package which has the function forecast.myclass . I want that function to work nicely with forecast package. I.e. when forecast package is loaded the code forecast(object) should call forecast.myclass from my package. Since I need only generic definition of forecast from the package forecast , and I do not use any other function from the package forecast I am reluctant to include it in the Depends. So I define the generic in my package in the following way: ##' ##' @export forecast <- function(object,...) UseMethod("forecast") ##' @rdname forecast.midas_r ##' @method forecast

devtools::install_github Error in function (type, msg, asError = TRUE) : <not set>

北城余情 提交于 2019-11-30 07:14:49
I'm trying to install a package via devtools::install_github for the first time l@np350v5c:~$ R --vanilla > library(devtools) Attaching package: ‘devtools’ The following objects are masked from ‘package:utils’: ?, help The following object is masked from ‘package:base’: system.file > search() [1] ".GlobalEnv" "package:devtools" "package:stats" [4] "package:graphics" "package:grDevices" "package:utils" [7] "package:datasets" "package:methods" "Autoloads" [10] "package:base" but, eg > install_github("devtools") Installing github repo devtools/master from hadley Downloading master.zip from https: