Displaying 20 results from an estimated 6000 matches similar to: "what don't I get about numeric/double comparisons in R way?"
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
2010 Dec 17
0
How to use the RUnit tracker in unit tests?
R-developers
Does anybody know how I incorporate the use of the tracker in RUnit
in the unit tests?
I have read the RUnit Vignette, help pages and searched around,
but I could find no examples of using 'inspect' in the unit
test functions. Moreover, doing so, I tried something like
library(RUnit)
myFunction <- function(x) {
return(x)
}
track <- tracker()
track$init()
2009 Dec 31
1
iterating over a data frame the R way?
Hi,
I have a data frame that was create by issuing a select against my
sqlite database. I want to get each row from the data frame and use
the each of the column values. The data frame looks like this:
start_time end_time
09:30:00 10:00:00
10:00:01 10:30:00
etc
Can a point me to a tutorial/example of doing this? I the other
programming languages I'm familiar with I
2007 Dec 05
2
Displaying numerics to full double precision
I'm working on a shared library of C functions for use with R, and I want to
create a matrix in R and pass it to the C routines. I know R computes and
supposedly stores numerics in double precision, but when I create a matrix
of random numerics using rnorm(), the values are displayed in single
precision, and also exported in single precision when I pass them out to my
C routines. An example
2007 May 09
4
Unit Testing Frameworks: summary and brief discussion
Greetings -
I'm finally finished review, here's what I heard:
============ from Tobias Verbeke:
anthony.rossini@novartis.com wrote:
> Greetings!
>
> After a quick look at current programming tools, especially with regards
> to unit-testing frameworks, I've started looking at both "butler" and
> "RUnit". I would be grateful to receieve real
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
2013 Jan 14
1
Issue with getParserData in R3.0.0
Hello,
I am migrating my package lambda.r to R3.0.0 and am experiencing some issues with the getParserData function (which replaces the parser package). Basically the function works in the R shell but fails when either called from RUnit or from R CMD check.
I've narrowed it down to the function getSrcfile, which is returning different values depending on the code path. From the command line
2010 Nov 05
0
About installing RBloomberg
Hi folks,
Debian 600 64bit desktop
> sudo R
Password:
> install.packages("RBloomberg", repos="http://R-Forge.R-project.org")
....
....
* DONE (zoo)
ERROR: dependencies ?rcom?, ?bitops?, ?RUnit? are not available for package
?RBloomberg?
* removing ?/usr/local/lib/R/site-library/RBloomberg?
Failed
> install.packages("RBloomberg", "rcom",
2004 Oct 05
1
R 2.0.0: problem: installing --with-package-versions
Hello R developers,
installing R 2.0.0 from source on a Linux Debian system (gcc 3.2.2)
- which worked just fine - I encountered the following problem when trying to
update/install packages with the option --with-package-versions:
example: RUnit 0.4.0 (also on CRAN)
R20 CMD INSTALL -l /mnt/local/R/R-2.0.x-libs-EpiR --with-package-versions
RUnit_0.4.0.tar.gz
or after untaring
R20 CMD INSTALL
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)
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
| `-
2010 Jan 17
4
How to convert character matrix or data.frame to numeric?
Hello,
This turned out to be surprisingly hard for me:
Let's say I have
mm = matrix(as.character(seq(1,30, 1)), nrow=3); mm
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] "1" "4" "7" "10" "13" "16" "19" "22" "25" "28"
[2,] "2" "5"
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
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
2004 Jun 10
0
samba with daemontools
Hi all,
I am trying to use samba with daemontools. (and it's brother runit:
http://smarden.org/runit/).
I do not want to talk much about runit itself. The main point is that
samba *must* run in foreground mode (no fork, no detach from terminal).
It is fine up to this point. I found an option '-F' and if I start with
smbd -F It will run in foreground so it's OK.
But I want to
2008 Apr 25
2
Differentiate alphanumeric vs numeric strings
I have a bunch of tables in a Microsoft Access database. An updated database
is sent to me every week containing a new table. I know that is inefficient
and weird but welcome to my life. I want to read the tables whose names are
something such as "040207" but not the ones that have alphanumeric names
such as "everyone". Using RODBC I am easily able to create a character
vector
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 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
2007 Dec 07
4
How to prevent fix() from converting Dates into numeric
Dear list members
Here is a strange problem that I have had for a long time, without
finding out how to solve it. Whenever I use fix() on a data.frame that
contains Dates, these are converted to numerics. As shown by the very
simple example:
a <- data.frame(var1 = 1, today = Sys.Date() )
a
fix(a)
a
Why is that? And can anything be done against it?
Many thanks for your help!
Best,