sounds great!
On Tue, Jan 3, 2017 at 11:32 AM, Jeroen Ooms wrote:
> On Tue, Jan 3, 2017 at 3:53 PM, Whit Armstrong
> wrote:
> >
> > I maintian the rzmq project.
> >
> > love to get it running on windows, but zmq doesn't play nicely with R's
> > m
Hi, Paul.
I maintian the rzmq project.
love to get it running on windows, but zmq doesn't play nicely with R's
mingw.
These guys have taken the approach of building the entire zmq library
inside the R package:
https://github.com/snoweye/pbdZMQ
I suggest you give it a try. or if you want to atte
I would love to see optional c++0x support added for R.
If there is anything I can do to help, please let me know.
Sincerely,
Whit
On Mon, Oct 7, 2013 at 5:47 PM, Dirk Eddelbuettel wrote:
>
> Hi Martyn,
>
> On 7 October 2013 at 21:18, Martyn Plummer wrote:
> | I don't see any harm in allowin
Can anyone share some opinions on test suites for R packages?
I'm looking at testthat and RUnit. Does anyone have strong opinions on
either of those.
Any additional packages I should consider?
Thanks,
Whit
__
R-devel@r-project.org mailing list
https:/
I'm trying to R CMD check a package, and I'm getting the 'checking S3
generic/method consistency' warning.
I have written a function 'gamma.dist' which is _not_ an S3 method,
but happens to collide with the 'gamma' function from the R::base
namespace.
Is there a way of telling CMD check that the
Thanks, Duncan.
Your suggestion works.
And thanks for the hint, about the env. I suppose I should preserve
the env of the original function where the substitute was called...
Cheers,
Whit
On Mon, Apr 16, 2012 at 8:01 PM, Duncan Murdoch
wrote:
> On 12-04-16 5:53 PM, Whit Armstrong wr
Can someone offer some advice on how to properly evaluate a SYMSXP
from a .Call ?
I have the following in R:
variable xn, with an attribute "mu" which references the variable mu
in the global environment.
I know "references" is a loose term; mu was defined in this fashion as
a way to implement d
if you don't mind going outside of R to create it, then check out
Graphviz: http://www.graphviz.org/Gallery.php
you may have to reformat your data a little, but this tool is great
for drawing graphs.
-Whit
On Tue, Mar 27, 2012 at 5:14 AM, MSousa wrote:
> Good morning,
>
>
> I'm trying to draw
Here's a snip from r-hcp. You can probably find it in the archive:
From: Michael Spiegel
Date: Thu, Sep 29, 2011 at 11:38 AM
Subject: RE: [R-sig-hpc] [zeromq-dev] rzmq package
Calling serialize/serialize from c/c++ is not too convoluted. You can
find a good example in
https://github.com/mspiegel/
Since you are using git you may want to consider a submodule for your project.
It is often helpful to build a full library in c++ complete with it's
own unit tests.
You can then package this library inside of your R project as a submodule.
This can speed up the testing phase of the project b/c y
Romain,
> that's not what I said. It just felt not as easy to use as just grab a SEXP
> and say R_PreserveObject( x ) and then later R_ReleaseObject.
Didn't mean to suggest that you said that. I was asking the list
whether it's discouraged.
Will follow up on the Rcpp list.
-Whit
_
Romain,
Is the use of UNPROTECT_PTR discouraged? I wonder why you haven't
considered using it instead.
I have a similar project that uses a ref counting scheme and handles
the deletion of the shared object with UNPROTECT_PTR. This method has
been working fine, but if there are reasons I should
and fts, making heavy use of templates for R types:
http://github.com/armstrtw/fts
-Whit
On Thu, Dec 10, 2009 at 4:16 PM, Dirk Eddelbuettel wrote:
>
> On 10 December 2009 at 15:02, Peng Yu wrote:
> | I want to see some working examples on how to call C++ programs from
> | R. Could somebody let
I've had success w/ using a reference counting paradigm in which the outside
memory manager calls UNPROTECT_PTR(R_object_); in its destructor.
So, in my case (using c++ ) if objects are allocated on the heap, which
allocate R objects as their backend storage, I don't have to worry about out
of ord
if you are using external pointers, then R allows you to set a
finalizer function to be called on the pointer.
http://cran.r-project.org/doc/manuals/R-exts.html#External-pointers-and-weak-references
see examples in RODBC package.
and here too:
see the "connFinalizer" function
http://github.com/a
If you are in control of the c++ library (i.e. it is not from a
vendor), then you can also override the new operator of your object so
that it allocates an SEXP. if you implement PROTECT/UNPROTECT calls
correctly, then GC will not be a problem.
The approach that I've taken with my time series lib
> But this draws me back to the basic question. I don't want to run R
> CMD INSTALL 20 times per hour. How do developers "actually" test
> their code?
check out RUnit for tests.
http://cran.r-project.org/web/packages/RUnit/index.html
as for testing c++ code. I have taken an approach which is p
onments can be changed.
>
> -roger
>
> On Thu, Apr 2, 2009 at 9:41 AM, Whit Armstrong
> wrote:
>> Thanks to everyone for the suggestions.
>>
>> The package local environment (per Roger Peng) works well.
>> .localstuff <- new.env()
>> .localstuff$bbg.db.con
>
> Philippe Grosjean
>
>
> Roger Peng wrote:
>>
>> I usually use environments for this. So, in one of the R files for the
>> package, just do
>>
>> .localstuff <- new.env()
>>
>> Then, in functions you can do things like
>>
>> .localstu
for the moment, I'm using:
.onAttach <- function(libname, pkgname) {
.bbg.db.conn <<- dbConnect(dbDriver("PostgreSQL"), user="blah","blah")
}
.onUnload <- function(libpath) {
dbDisconnect(.bbg.db.conn)
}
which results in a hidden global variable in the global environment.
I would prefe
Why does the following show a class attribute of "character" when
using the interpreter:
x <- data.frame(hat=1:10)
class(rownames(x)) ## returns [1] "character"
but when called from c/cpp, the rownames attribute has no class
attribute, and is in fact a vector of INTSXP?
> .Call("print_class_of_
probably easy to do w/ Boost DateTime
http://www.boost.org/doc/libs/1_37_0/doc/html/date_time.html
for which there is already an R package in development:
http://repo.or.cz/w/RBoostDateTime.git
I'm happy to write a small wrapper to do what you want if you can
offer a pseudocode example of the co
changing the build
script to link the files incrementally (is that possible). To my
knowledge no other packages out there have such an insane amount of
files.
-Whit
On Tue, Dec 9, 2008 at 5:59 PM, Whit Armstrong <[EMAIL PROTECTED]> wrote:
> Thanks for the link, Prof. Ripley.
>
>&
Thanks for the link, Prof. Ripley.
> What I suspect is happening is that there is a link command starting with
> 'g++' that is too long.
> One useful ref: http://www.in-ulm.de/~mascheck/various/argmax
interesting...
on my system:
[EMAIL PROTECTED] src]$ getconf ARG_MAX
131072
[EMAIL PROTECTED]
t; have the c compiler installed but not the c++ compiler)
>
>
>
> Maybe it will be worthwhile to check if you have installed every required
> header files or needed compilers/libraries.
> But as I mentioned, this is just a suggestion.
> Cheers,
> Mathieu
>
> Whit Armstrong a écrit
]> wrote:
> Never used, but I seem to recall that this was good for that:
>
> http://en.wikipedia.org/wiki/Xargs
>
> Jeff
>
> On Tue, Dec 9, 2008 at 3:13 PM, Whit Armstrong <[EMAIL PROTECTED]> wrote:
>> Since, gcc was using upwards of 2gb of ram to compile my pac
Since, gcc was using upwards of 2gb of ram to compile my package, I
just split all the functions into individual files.
I guess I'm too clever for myself, because now I get hit with the
"Argument list too long" error.
Is there a way to deal with this aside from writing my own configure
script (wh
yes, this was just a parallel build within one package.
Thanks very much for your help.
-Whit
On Mon, Dec 1, 2008 at 6:01 AM, Uwe Ligges
<[EMAIL PROTECTED]> wrote:
>
>
> Prof Brian Ripley wrote:
>>
>> On Mon, 1 Dec 2008, Uwe Ligges wrote:
>>
>>>
&g
linux, x86-64.
omg, MAKE="make -j8" R CMD INSTALL works beautifully.
Thanks for making me see the light.
Cheers,
Whit
On Sun, Nov 30, 2008 at 12:29 PM, Peter Dalgaard
<[EMAIL PROTECTED]> wrote:
> Whit Armstrong wrote:
>>
>> I have a package that takes about 20
I have a package that takes about 20 minutes to compile which tends to
prolong the compile/test/compile cycle.
Does anyone know how to get R CMD check or R CMD INSTALL to use parallel make?
I looked at R CMD INSTALL --help, but I don't see anything obvious
arguments to do this.
Thanks,
Whit
___
[EMAIL PROTECTED] R.packages]$ sudo R CMD INSTALL portfolio.construction
* Installing to library '/usr/local/lib64/R/library'
* Installing *source* package 'portfolio.construction' ...
** R
** preparing package for lazy loading
Loading required package: fts
Loading required package: quadprog
Loadi
no all compilers support the export keyword.
just put the template in a .h or .hpp file and include it in your .cpp
file. that should be enough.
-Whit
On Tue, Nov 18, 2008 at 2:50 PM, charlie <[EMAIL PROTECTED]> wrote:
> Thanks guys for all your kind heartedness.
>
> Yeah, I got messed up with
did you wrap your function prototype in extern "C" ?
-Whit
On Thu, Nov 6, 2008 at 1:16 PM, charlie <[EMAIL PROTECTED]> wrote:
> Hi, all
>
> I didn't get any response from swig for my question.
> see if I can get some help here
>
> Thanks
>
> -- Forwarded message --
> From: charli
sorry, for joining this thread so late. I've just upgraded to R2.8.0
and was hit with the same issue immediately in my fts package.
Has any consensus been reached about how to deal with this issue?
Do I understand correctly that the change to use:
[sort.c: 592]
PROTECT(call = lang4(install(".gt"
Is this a bug, or have I misunderstood the proper use of lm?
Thanks,
Whit
code:
x <- rnorm(50)
y <- matrix(as.logical(round(runif(100),0)),ncol=2)
NROW(x)==NROW(y)
lm(x~y)
> x <- rnorm(50)
> y <- matrix(as.logical(round(runif(100),0)),ncol=2)
> NROW(x)==NROW(y)
[1] TRUE
> lm(x~y)
Error in "[[
35 matches
Mail list logo