similar to: How to use the RUnit tracker in unit tests?

Displaying 20 results from an estimated 1000 matches similar to: "How to use the RUnit tracker in unit tests?"

2006 Feb 04
1
RUnit - need advice on a good directory structure or tips...
I made my own RUnit testing convention, and I want to introduce this to one of my friends. Before that, I'd like to review my codes. The problem that I met when I tried to polish my codes is: How can I get the file path in the file??? I.e., I want to get the path to the file that I'm writing using some magic R functions. But I couldn't find any good magic. Is there any magic? So, I
2009 Dec 31
1
what don't I get about numeric/double comparisons in R way?
Hi, I'm pretty much an R noob and I'm missing some paradigm in R I think. I can't figure our how to compare numerics. here's a transcript of my tests. Any pointers? > print(range_sd) [1] 34.40783 > is.numeric(range_sd) [1] TRUE > is.numeric(foo) [1] TRUE > is.double(range_sd) [1] TRUE > is.double(foo) [1] TRUE > > identical(range_sd, foo) [1]
2010 Nov 19
0
Error from sparse pattern matrix product
Hi The following attempt to minimize memory consumption fails. m1 <- Matrix(c(rep(1,1000), rep(0,2000)), 1500) m2 <- as(m1, "ngCMatrix") Then m1 %*% c(1,2) produces the desired matrix product, while m2 %*% c(1,2) results in the error Error in x %*% y : Cholmod error 'invalid xtype' at file:../MatrixOps/cholmod_sdmult.c, line 82 I might be making a wrong
2010 Sep 16
1
The permutation of one vector into another
Dear R-help-list I have two character vectors a <- c("A", "B", "C") b <- c("A", "C", "B") Then sapply(a, function(i) grep(i, b)) computes the permutation of the entries in 'b' needed to bring 'b' into the same order as 'a'. I have searched around, but haven't been able to find any existing function
2010 Dec 11
1
'identical' and the warning "ignoring non-pairlist attributes"
Dear R developers Using the 'foreach' package I encounter warnings like Warning message: In identical(.combine, cbind) : ignoring non-pairlist attributes Warnings appear once in a new R-session when I run a particular piece of code - and not again. I understand from the source code of 'identical' that the function checks and believes that .combine and cbind have non-pairlist
2011 Apr 14
2
Krylov subspace computations of matrix exponentials
I use the very nice expm functions available from the expm and Matrix packages. My understanding is that for large sparse matrices the currently best methods available are Krylov subspace methods, but they are as far as I can tell not implemented in either of the packages mentioned, nor in any other R package I have found. Does anybody know if Krylov subspace methods are available from any R
2010 Sep 03
1
'seq' help page: seq_length -> seq_len?
In the Value section of the 'seq' help page it says 'seq_along' and 'seq_length' always return an integer vector. I believe it should be 'seq_along' and 'seq_len' always return an integer vector. as there are no seq_length function? Best, Niels -- Niels Richard Hansen Web: www.math.ku.dk/~richard Associate Professor
2010 Sep 30
1
Assignment to a slot in an S4 object in a list seems to violate copy rules?
Dear R-developers I came across the following issue, which I find strange: setClass("A", representation(a = "numeric")) B <- list() myA <- new("A", a = 1) B$otherA <- myA B$otherA at a <- 2 myA at a Assigning a new value to slot 'a' in the _copy_ of myA stored in B$otherA changes the original value of myA -- this was surprising to me, and I
2006 Mar 18
2
ANN: capistrano-runit-tasks 0.1.0
I''d like to announce the first release of capistrano-runit-tasks. This came about as I wanted to use runit rather than spinner/spawner/ reaper on my memory limited VPS but should be useable for any setup. From the README: This library extends Capistrano to allow processes to be supervised using the runit package. It replaces some of the standard tasks with runit versions and
2007 Sep 05
2
RUnit testing with R CMD check and more (was: R CMD check recursive copy of tests/)
Hello! I have looked at Martin's recent work on "merging" unit tests with R CMD check, fused it with my and Tony's contributions and developed it a bit further. Take a look into the attached demo package on how it works. In essence: PKG/inst/RUnitTests |- runRUnitTests.R (script to run RUnit tests) \- ... (any RUnit test file)
2009 Jul 10
1
RUnit detects parse error, but why?
Folks, An RUnit test suite is failing after all tests are complete with the following message: Error in parse(n = -1, file = file) : unexpected '}' at 620: 621: } All individual tests work when run individually, and all but one run within the RUnit test suite. What might be causing this? A similar error message during package creation was discussed earlier
2006 Aug 05
1
R CMD check and RUnit
Hi! I appologize for crossposting, but this might be of broader interest. In case you are interested in fusing RUnit with R CMD check under unix alike OS, here is one way of doing/hacking this. My aim was to perform unit tests: (1) during R CMD check (2) at any other time Say you have a package PKG in a map PKG. I use the following structure PKG |- R |- ... |- inst | |- doc | `-
2004 Aug 09
2
Approaches to using RUnit
Having used JUnit and PyUnit, I was pleased to see the release of the RUnit package on CRAN. I'm wondering if there are any RUnit users out there that would be willing to share some tips on how they organize their code to work with RUnit. Specifically, I'm wondering about the best way to load/import/source the functions to be tested. I would like to end up with a script, testall or some
2010 Apr 30
0
Runit
Hello Does anybody have any advice, or even some ready-made configuration, for running logcheck on svlogd log files? svlogd is the logging daemon provided by runit, a replacement for sysv init with service supervision. svlogd, and thus runit, are incompatibile with vanilla logcheck, because svlogd logfiles are rotated when they reach a certain size, not at a certain time. Therefore when logcheck
2006 Mar 23
4
ANN: capistrano-runit-tasks 0.2.0
I''d like to announce the second release of capistrano-runit-tasks, available from http://rubyforge.org/projects/cappy-runit/ It now supports: * File based templates * sv as the service control command in addition to runsvctrl * A much simpler interface for creating additional services. More work still needs to be done though! == TODO * Allow add_service to create more than one
2013 May 20
2
Unicorn + RUnit Rails Not Killing Old Master
Hi, I''m deploying Unicorn on a Rails application with RUnit. Technically I''m using Chef''s deployment tools, if any of you are familiar with it (https://github.com/opscode-cookbooks/application_ruby) but to be clear they aren''t doing anything magical, so this is purely an issue with RUnit and Unicorn. The TL;DR of the following post, which has lots of
2010 Apr 22
2
RUnit bug?
There appears to be a bug in RUnit. Given a testsuite testsuite.math, say, when I run: runTestSuite(testsuite.math) this works fine, provided there are no extraneous files in the unit test subdirectory. But if there are any Emacs temp files (with names that end with '~') then runTestSuite gets confused and tries to run functions from the temp files as well. [[alternative HTML version
2004 Jun 11
0
New package: RUnit
We would like to announce the availability on CRAN of a new package: RUnit It contains a unit testing framework strongly inspired by Javas popular JUint package. In addition it contains some functionality to investigate the degree to which some function is covered by a test suite. The main aims of the package are - to support a development style where test cases are written and constantly
2004 Jun 11
0
New package: RUnit
We would like to announce the availability on CRAN of a new package: RUnit It contains a unit testing framework strongly inspired by Javas popular JUint package. In addition it contains some functionality to investigate the degree to which some function is covered by a test suite. The main aims of the package are - to support a development style where test cases are written and constantly
2009 Oct 26
2
R CMD check: Error in .C
Function/file names are hypothetical. Say I have written myfunction.R, which calls myfunction.c via .C("myfunction", ...). I've compiled successfully myfunction.c via R CMD SHLIB myfunction.c in the terminal. Then, in the R console: dyn.load("myfunction.so") source("myfunction.R") test <- myfunction() # works fine So everything is in order, myfunction works