I am developing an R package that calls functions from the package rstan. As a MWE, my test file is currently set up like this, using code taken verbatim from rstan's example:
library(testthat)
library(rstan)
# stan's own example
stancode <- 'data…
I've created a package that has a function, in this case is myfunction(argument1, argument2), that requires only positive inputs that have the same length as arguments. And I want to test whether the input is in a correct format using functions from…
I'm using testthat package for unit testing in R. I have a function CalcByResultSubModel which has one more function CalculateX which is called inside the main function. This is the main function,
CalcByResultSubModel = function(doll_data,…
I am new to gitlab ci/cd. i like how it works. I would like to run certain tests in certain branches. how can i define the same in yml file?
I am using gitlab ci/cd for R package development and using testthat package for unit-testing.
I'm a new to R and package development so bear with me. I am writing test cases to keep package is line with standard practices. But I'm confused if I do the checks in testthat, should I not perform if/else checks in the package…
I googled, found this; accordingly, ran test_dir() (it errors), tried test_dir(getwd()) from the package root (it also errors). I also tried test_package(), but it also errors if the argument is left NULL or returns nothing if the package name is…