devtools

Is it possible to use R package data in testthat tests or run_examples()?

大兔子大兔子 提交于 2019-12-03 02:18:24
问题 I'm working on developing an R package, using devtools, testthat, and roxygen2. I have a couple of data sets in the data folder (foo.txt and bar.csv). My file structure looks like this: / mypackage / data * foo.txt, bar.csv / inst / tests * run-all.R, test_1.R / man / R I'm pretty sure 'foo' and 'bar' are documented correctly: #' Foo data #' #' Sample foo data #' #' @name foo #' @docType data NULL #' Bar data #' #' Sample bar data #' #' @name bar #' @docType data NULL I would like to use the

Why is Vue.js Chrome Devtools not detecting Vue.js?

与世无争的帅哥 提交于 2019-12-03 01:18:22
I have the following code with a simple working Vue.js application. But the vue.js devtools is not responding. It was working well a few days ago, now it's not working anymore what could possibly be going wrong? when I go to https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd , it says it is already added. <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <script

Make third party library available in my R package [duplicate]

纵饮孤独 提交于 2019-12-02 19:32:45
问题 This question already has answers here : Regular expression to match a line that doesn't contain a word (29 answers) Better explanation of when to use Imports/Depends (4 answers) Closed last year . I am developing an R package that uses third party functions available in the Bioconductor package "methyilumi" In the code for my R package at the very beginning I import methylumi with library(methylumi) . During the development (I use roxygen2 and devtools) everything works fine. However, when I

Start new R package development on github

久未见 提交于 2019-12-02 16:50:54
How do I create new repository on github using devtools in RStudio? I've tried to: Create empty repository on github named "MyNewRPackage" Started new project in RStudio using ssh connection to my git repository Installed and loaded devtools Then I thought I will use create("MyNewRPackage") to initialize directory structure and README.md file. But the package skeleton is created as subfolder of my project and I have ~/MyNewRPackage/MyNewRPackage/R . But I need to create package skeleton in the root folder of my github repository. What is the standard way to start new R package development on

Is it possible to use R package data in testthat tests or run_examples()?

岁酱吖の 提交于 2019-12-02 15:48:55
I'm working on developing an R package, using devtools, testthat, and roxygen2. I have a couple of data sets in the data folder (foo.txt and bar.csv). My file structure looks like this: / mypackage / data * foo.txt, bar.csv / inst / tests * run-all.R, test_1.R / man / R I'm pretty sure 'foo' and 'bar' are documented correctly: #' Foo data #' #' Sample foo data #' #' @name foo #' @docType data NULL #' Bar data #' #' Sample bar data #' #' @name bar #' @docType data NULL I would like to use the data in 'foo' and 'bar' in my documentation examples and unit tests. For example, I would like to use

check() new R package

社会主义新天地 提交于 2019-12-02 04:35:27
问题 Why check() is not able to find function in my package? I have a small package with function iv.num . My example in documentation is iv.num(german_data,"mob","gbbin") . If I run check() , I get error - could not find function. However, I am able to run the function without any problems as shown below. I'm using R 3.0.1. and devtools (using load_all() before check() . Unfortunately, I am not able to create reproducible example, the package is on github * checking examples ... ERROR Running

Using install.packages with custom temp dir

僤鯓⒐⒋嵵緔 提交于 2019-12-02 00:12:11
I would like to install a package with a security profile that does not have access to /tmp , but has its own temporary directory, for example /tmp/jeroen . However even though I try to pass the TMPDIR environment variable, it still fails because it tries to use /tmp . Below a toy example using RAppArmor and unixtools (see here for the test profile) > library(RAppArmor) > library(unixtools) > dir.create("/tmp/jeroen") > set.tempdir("/tmp/jeroen") > setwd(tempdir()); > aa_change_profile("r-test") Switching profiles... > print(tempdir()); [1] "/tmp/jeroen" > install.packages("plyr", lib="/tmp

Using install.packages with custom temp dir

时光怂恿深爱的人放手 提交于 2019-12-01 22:11:31
问题 I would like to install a package with a security profile that does not have access to /tmp , but has its own temporary directory, for example /tmp/jeroen . However even though I try to pass the TMPDIR environment variable, it still fails because it tries to use /tmp . Below a toy example using RAppArmor and unixtools (see here for the test profile) > library(RAppArmor) > library(unixtools) > dir.create("/tmp/jeroen") > set.tempdir("/tmp/jeroen") > setwd(tempdir()); > aa_change_profile("r

Redirect system2 stdout to a file on windows

两盒软妹~` 提交于 2019-12-01 20:51:22
According to the manual , the stdout argument of the system2 function can redirect output to a file. This seems to work on unix, however I can't get it to work on windows. The toy example below, no out.txt or err.txt files are created. I tried sending it to an existing file, or expand the full file path, but with no success: setwd(tempdir()) system2("whoami", stdout="out.txt", stderr="err.txt") file.exists("out.txt") Am I doing something wrong or is this a limitation in system2 ? I'm quite convinced now this is a bug in RGui.exe in windows. I filed a bug report here: https://bugs.r-project.org

devtools/GitHub download error

岁酱吖の 提交于 2019-12-01 19:49:07
As of today I can not use devtools to install a package from GitHub. I don't know if the error lies in: Me devtools GitHub I'm using install_github as follows and get the following error: library(devtools) install_github("reports", "trinker") ## > library(devtools) ## > install_github("reports", "trinker") ## Installing github repo(s) reports/master from trinker ## Installing reports.zip from https://github.com/trinker/reports/archive/master.zip ## Error in function (type, msg, asError = TRUE) : ## transfer closed with outstanding read data remaining ## ## TRIED WITH SECOND REPO: ## ## >