Displaying 20 results from an estimated 600 matches similar to: "R package tests"
2009 Mar 03
1
R 2.9.0 devel: package installation with configure-args option
Hi,
trying
to install a package containing C code and requiring non-default configure argument
settings the incantation (this has worked for R <= 2.8.1 on the same architectures)
R CMD INSTALL --configure-args="--with-opt1 --with-opt2" packname
does always result in a warning
Warning: unknown option '--with-opt2'
and consequently the option is ignored. Reverting the order
2004 Jul 21
1
Avoid return code 24 (file vanished) with command line option?
Hi!
Is it possible to avoid this error condition by specifying a command
line option? I haven't found an obvious one in the manual.
Background: We are using rsync for a live backup of our home
directories. Emails are stored in Maildir format within the
homedirectories. The rsync process is running for some time and in the
meantime emails get deleted because users still have IMAP access.
The
2009 Jan 12
4
fitting curve to data
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have the following data:
> y
[1] 0.000 0.004 0.008 0.016 0.024 0.032 0.044 0.064 0.072 0.088 0.108 0.140
[13] 0.156 0.180 0.208 0.236 0.264 0.296 0.320 0.360 0.408 0.444 0.472 0.524
[25] 0.576
> x
[1] 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500
[16] 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500
I'd
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
2007 Mar 15
4
R 2.5.0 devel try issue in conjuntion with S4 method dispatch
Hi,
after updating R 2.5.0 devel yesterday we today observed many new
unexpected failures in our daily package build and test system runs,
which can be traced to recent changes in the implementation in try()
(as noted in NEWS).
Investigating this new implementation I come across an issue in
conjuntion with using S4 classes and methods. try(expr) does not return an
object with attribute
2009 Jan 07
2
Memory Efficiency of Symmetric Matrix
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm generating a symmetric correlation matrix using a data matrix as input:
mat <- cor(data.mat)
My question is:
Is there a more memory efficient way to store this data? For instance, since:
all(mat == t(mat))
every value is duplicated, and I should be able to almost half the memory usage for large matrices.
Any thoughts/comments?
Cheers,
2009 Mar 05
3
methods package
I'm working on the next version of coxme, one step of which is converting
the bdsmatrix library from Splus to R. Actually, it is a conversion from
S4 methods as first described in the Green book to S4 methods as they
currently exist. Mostly it's going ok, but not entirely.
1. The biggest issue is lack of documentation. The online help pages have
not been a help; they keep saying
2004 Sep 07
4
"parallelizing" the two initial phases?
Hi (especially Wayne),
ftp.gwdg.de is rsyncing most of the data from about 500 other rsync
servers.
Especially during the general "high traffic" phases like the release of
a new Knoppix ISO or a new SUSE distribution or a new KDE release, I see
timeouts with other servers which have maximum traffic at that time.
There is a general scheme:
1. rsync is building the data base of the
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
2008 Apr 01
3
"Dumb" proxying?
I'm a database noob, and it really seems like it would be overkill for my
setup: I just want to proxy all connections from my DMZ to my internal mail
server -- same internal server for all users. I used to use perdition for
this set up, but am having issues getting it to play nicely with my new servers.
Can I bypass all of the SQL stuff and just have dovecot forward all POP/IMAP
2009 Oct 05
3
unit testing for R packages?
Hi All,
I'm interested in putting some unit tests into an R package I'm
building. I have seen assorted things such as Runit library, svUnit
library, packages
with 'tests' directories, etc
I grep'd "unit test" through the writing R extensions manual but didn't find
anything. Are there any suggestions out there? Currently I have
several (a lot?) classes/methods
2008 Jan 03
3
(somewhat ot?) purging old maildir messages
I'm using Dovecot (+postfix) to host some personal imap accounts on a
private server (Maildir format). I've got one account that receives
mostly automated mails, and I want to be able to purge messages beyond
a given date (say 30 days).
I know that since maildir uses flat files, I can literally just delete
messages doing something similar to the following with bash:
for i in $(find
2009 Feb 11
1
Looping over a matrix passed to .C
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've written a function in R which takes a symmetrical matrix as input and
processes all triplicate combinations of values from the matrix. The function
looks something like:
my_fun <- function(m) {
if( nrow(mat) != ncol(mat) ) {
stop("'m' must be a square matrix")
}
size <- nrow(m)
for(x in 1:(size -2)) {
2009 Apr 29
2
if condition doesn't evaluate to True/False
Hi friends,
Please help me with this bug.
*Bug in my code:*
In this variable sub_grp_whr_cls_data[sbgrp_no,1] I store the where
clause.every sub group has a where condition linked with it.
Database1
Where clause was not found for a particular subgroup,
sub_grp_whr_cls_data[sbgrp_no,1] value was NULL
So the condition (*sub_grp_whr_cls_data[sbgrp_no,1]=="NULL" ||
2009 Jan 07
2
Understanding dsyrk_ in C code
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm trying to understand some C code in an R package I'm using. I'm address this question here as
it's matrix algebra...and I'm no pro at that!
the C command reads:
double alpha = 1.0, beta = 0.0;
dsyrk_("L", "N", nGenes, nGenes, & alpha, mat1, nGenes,
& beta, mat2, nGenes);
- From google,
2009 May 29
1
Package Licences
Are there any particular licences under which R packages must be released or is
it the discretion of the author? The same question if the package is to be
destined for CRAN?
Kind regards,
Nathan
--
--------------------------------------------------------
Dr. Nathan S. Watson-Haigh
OCE Post Doctoral Fellow
CSIRO Livestock Industries
Queensland Bioscience Precinct
St Lucia, QLD 4067
Australia
2009 Jun 17
1
Coerce rectangular matrix to symmetrical square matrix
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have a rectangular matrix of size 920 by 85. I'd like to coerce it into a
square matrix such that all row/col names are present in the new matrix and the
additional values are zero.
As an example:
A B C D
A 1 2 3 4
E 5 6 7 8
F 9 10 11 12
Would be coerced to:
A B C D E F
A 1 2 3 4 5 9
B 2 0 0 0 6 10
C 3 0 0
2012 Mar 02
1
seeing feedback when R CMD check pkg runs unit tests.
good day here,
I'm maintaining a couple of R modules, both on r-forge.
tests for these modules are written making use of unit testing, and I
make use of the svUnit module, part of SciViews-R.
I also make use of examples in the .Rd files.
my question regards 'R CMD check pkg'.
if an _example_ is not run correctly, I get clear feedback on the
command line where I run 'R CMD
2009 Mar 26
1
Splitting Area under curve into equal portions
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have some data generated as follows:
<code>
n <- 2000
work <- vector()
for(x in 1:n) {
work[x] <- sum(1:(n-x+1))
}
plot(work)
</code>
What I want to do
- -----------------
I want to split work into a number of unequal chunks such that the sum of the
values in each chunk is approximately equal.
The numbers in
2009 Feb 17
1
Create package with Fortran 90 and C code
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm trying to add some Fortran 90 code to an existing package.
When I compile and load the file manually like:
SHELL> R CMD SHLIB file.f90
R> dyn.load("file.so")
I can use the .Fortran() fine. However, when I try to build, install and load
the library I seem to be missing something.
I do a:
SHELL> R CMD build dir
SHELL> R