I'm also not able to reproduce, but I see a different linker invocation:
g++ -shared -static-libgcc -o sourceCpp_3.dll tmp.def file43185fe94049.o
-LC:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64
-LC:/rtools43/x86_64-w64-mingw32.static.posix/lib -LC:/R/R-43~1.0/bin/x64
-lR
In particular,
On Thu, Feb 23, 2023 at 11:34 AM Kevin Ushey wrote:
>
> Hi Roberto,
>
> (RcppParallel maintainer here.) We had some correspondence with
> Professor Ripley regarding this; package authors affected by this
> could request the C++14 standard in their package as described here:
Hi Roberto,
(RcppParallel maintainer here.) We had some correspondence with
Professor Ripley regarding this; package authors affected by this
could request the C++14 standard in their package as described here:
https://cran.r-project.org/doc/manuals/R-exts.html#Using-C_002b_002b-code
I believe
For posterity, what machine are you compiling the package on? If you're
using a modern Linux system, it's possible the default compilation flags
are including stack protection code during compilation that might call
abort on error. See e.g.
+ level,
UnwindProtect() isn't the right tool -- you'll want a proper tryCatch()
handler.
It does also imply (as had been shown) that switching to unwind-protect
would be a behavior change in Rcpp, which may not be ideal.
Thanks,
Kevin
On Sun, Feb 6, 2022 at 9:39 AM Jeroen Ooms wrote:
> On
And I'm seeing you pointed that out at the end of the README... so yes, we
should probably just have our exception inherit from std::exception.
On Sun, Feb 6, 2022 at 9:31 AM Dirk Eddelbuettel wrote:
>
> On 6 February 2022 at 18:18, Jeroen Ooms wrote:
> | Well not really, this kind of misses my
oks like the exception can be caught -- just not via
std::exception.
On Sun, Feb 6, 2022 at 9:21 AM Kevin Ushey wrote:
> Is it possible the issue here is ultimately just that our
> LongjumpException class doesn't inherit from std::exception?
>
> On Sun, Feb 6, 2022 at 9:18 AM Jer
Is it possible the issue here is ultimately just that our
LongjumpException class doesn't inherit from std::exception?
On Sun, Feb 6, 2022 at 9:18 AM Jeroen Ooms wrote:
> On Sun, Feb 6, 2022 at 5:56 PM Dirk Eddelbuettel wrote:
> >
> >
> > On 6 February 2022 at 17:40, Jeroen Ooms wrote:
> > |
I assume we're talking about Vector::create()? Anyone curious poking at it
can start by looking here:
https://github.com/RcppCore/Rcpp/blob/940fb23868bf442e587994451e85263baa302d9c/inst/include/Rcpp/vector/Vector.h#L1122-L1126
On Wed, Dec 15, 2021 at 8:51 AM Dirk Eddelbuettel wrote:
>
>
I'm a fan. I think we could just have a single header RcppLite.h which
would turn off the "heaviest" pieces of Rcpp; that is, modules + sugar
+ (maybe?) RTTI.
Or, we could allow for #define RCPP_LEAN_AND_MEAN ... ;-)
On Fri, Dec 3, 2021 at 10:57 AM Dirk Eddelbuettel wrote:
>
>
> On 3 December
I think you're bumping into the 20 argument limit for our (now rather old)
Vector::create() implementation. I thought we also had a variadic C++11
version for this, but apparently I am mistaken...
A workaround is to use something like the ListBuilder class I put together
a while back here:
On Thu, Feb 18, 2021 at 1:36 AM Andrade Solomon
wrote:
>
> Dear list,
>
> I see here that Rccp strings have both a get_encoding() and a set_encoding()
> member functions, which respectively return and accept a cetype_t enum
> defined in Rinternals.h with options:
> CE_NATIVE = 0,
>
Are you able to share a reproducible example?
The CRAN check report from
https://www.stats.ox.ac.uk/pub/bdr/memtests/clang-ASAN/MatchIt/00check.log
points at MatchIt/src/nnm.cpp:182:24. You could probably distill the code
used in that location into a smaller reproducible example.
Best,
Kevin
On
The most likely cause here is that, even though Rcpp is being compiled
with gcc 9.2.0, an older version of libstdc++ is being found and used
at runtime, and that version of the libstdc++ library doesn't provide
the requested symbol (_ZTVN10__cxxabiv120__si_class_type_infoE).
Best guess:
FWIW, the implementation of of is_finite lives here:
https://github.com/RcppCore/Rcpp/blob/b1254701a899cb187f9a6917cb8d18c7f93290c7/inst/include/Rcpp/traits/is_infinite.h#L34-L37
I would recommend checking equality directly against the R constants
`R_PosInf` and `R_NegInf`.
As for whether this
> In file included from /usr/local/include/math.h:8:
The problem here is you have a bunch of headers in /usr/local/include
that are shadowing / overriding the "normal" system header files;
/usr/local/include/math.h being one of these (but I imagine there's
more).
To work around this, you'll have
://godbolt.org/z/dowsE5
But gcc trunk seems okay.
Best,
Kevin
On Sat, Feb 8, 2020 at 5:20 PM Dirk Eddelbuettel wrote:
>
>
> On 8 February 2020 at 16:59, Kevin Ushey wrote:
> | It seems like a bug in gcc 10 to me. IIUC, static local variables in
> | inline functions should still have i
It seems like a bug in gcc 10 to me. IIUC, static local variables in
inline functions should still have internal linkage, and so name
collisions like this should not occur.
I can work around this by making sure that 'fun' is given different
names in the RcppEigen stubs; e.g. fun1 and fun2 and so
On Sat, Feb 8, 2020 at 12:52 PM Joshua N Pritikin wrote:
>
> On Sat, Feb 08, 2020 at 03:47:49PM -0500, JJ Allaire wrote:
> >On Sat, Feb 8, 2020 at 3:45 PM Joshua N Pritikin
> ><[1]jpriti...@pobox.com> wrote:
> > Sure, but does it *have* to be that way? It seems to me that
> >
I think Tomas's post is clear and quite helpful, I just disagree with
the conclusions. IMHO C++ (through Rcpp) is still the best way to
interface with R from compiled code for the majority of users.
Tomas's comments were mainly around the fact that things can go wrong
if you start mixing R
In general, once an Rcpp API gives you a SEXP, it is unprotected and
the onus is on your to manage its protection.
In your code:
SEXP intSexp = call1.eval();
Language call2("levels",facSexp);
SEXP levelsSexp = call2.eval();
vals = as< std::vector
I think this might be worth fixing on the Rcpp side -- there should
really only be one instance of the Rcout object. Would you mind filing
an issue at https://github.com/RcppCore/Rcpp/issues, so we don't lose
track of this?
You could of course just create your own Rcout / Rcerr objects as well
I agree we should be using R_xlen_t here. As always, PRs are welcome.
You might want to file this at https://github.com/RcppCore/Rcpp/issues
just so it doesn't get lost.
Thanks,
Kevin
On Tue, Nov 6, 2018 at 11:23 PM Qiang Kou wrote:
>
> Hi, William,
>
> Can you give us a small piece of code to
I can reproduce if the 'pkgKitten' package is not installed. In that
case, I see in man/-package.Rd:
\examples{
~~ simple examples of the most important functions ~~
}
which of course is just a stub and not valid example code (and so
fails during check).
I think this is just gunk
FWIW, there's an associated bug report here:
https://github.com/google/sanitizers/issues/911
that indicates that ubsan emits false positives when attempting to diagnose
functions opened through dlopen(), which IIUC is the standard way that R
loads symbols from compiled libraries in R
I think the main problem is that it's easy to use your class incorrectly.
For example:
- What happens if your map is destructed? The SEXPs it is handling are
effectively leaked.
- What if you copy your map? Since SEXPs are pointers, you now have two
maps containing the same pointers, and if you
What environment are you executing this on? (R in terminal, or with a GUI;
which OS?)
One thing to be cautious of is that many R APIs in graphical environments
will also call for processing of events, and this in turn can also imply a
check for, and handling of, interrupts. Rprintf() is in fact
I think this is mostly because we still haven't ported the majority of
usages of Rcpp_eval() to the new Rcpp_fast_eval(), so by default users are
still getting the slower Rcpp_eval(). Compare e.g.
Rcpp::sourceCpp(code='
#include
using namespace Rcpp;
// [[Rcpp::export]]
void
o() after running the second
> command, includes nycflights13 in the section "loaded via a namespace (and
> not attached):" This is not the case after pulling the environment into an
> Rcpp variable.
>
> Thanks again for steering me,
> Jack
>
>
>
> On 04/15/2
The environments called 'package:foo' are associated with attached
packages; that is, they're located on the search path. You likely want to
find the actual package namespace.
I think we have a static function Environment::namespace_env() for this. Or
you can just call back to R with
In your RcppParallel worker, it looks like you're trying to write to
an Rcpp matrix; e.g. you have:
distmat_(i,j) = local_calculator->calculate(i,j);
where distmat_ is a matrix. You should avoid using Rcpp classes within
RcppParallel workers, as there's no guarantee that the methods
My understanding is that `integer64` actually stores its contents in an R
numeric vector, so presumedly you should be able to handle this by
forcefully casting the contents as you access it, e.g.
#include
using namespace Rcpp;
// [[Rcpp::export]]
NumericVector timesTwo(NumericVector input) {
I can't replicate the reported UBSAN issues on my macOS machine (R-devel
compiled with LLVM clang 4.0.1, with address + undefined behavior
sanitizers active).
The warnings look somewhat dubious to me: for example, the first warning:
function_pointers.h:99:12: runtime error: call to function
To be brief -- Rcpp modules are effectively in maintenance mode at this
point; we don't plan to extend / improve modules beyond resolving issues if
and when they come up. We did get to the bottom of the posted issue -- R
packages that use modules need to import the whole Rcpp namespace.
I'm not
My best guess is that the issue here is that 'gfortran' is being used for
linking, e.g.
c:/Rtools/mingw_64/bin/gfortran -shared -s
-Wl,--allow-multiple-definition -static-libgcc -o ForTest.dll tmp.def
RcppExports.o VecSum_C.o VecSum_F.o -LC:/R/RLocalSoft/lib/x64
-LC:/R/RLocalSoft/lib
I'm pretty sure I saw this post on StackOverflow before. Please don't cross
post, or at least indicate that you are when you do so. It's also nice to
give credit based on the advice you receive...
The main issue in your code, I think, is here:
struct Element : public
The simplest demonstrating example I can think of:
---
#include
using namespace Rcpp;
struct A { ~A() { Rprintf("~A()"); } };
// [[Rcpp::export]]
void ouch() {
A a;
Rf_error("ouch!");
}
/*** R
ouch()
*/
---
Call 'Rcpp::sourceCpp()' on that and you'll see:
>
.
On Wed, Aug 3, 2016 at 11:28 AM, Kevin Ushey <kevinus...@gmail.com> wrote:
> The problem with your implementation is what happens if R throws an
> error. The R longjmp will cause any C++ objects on the stack to leak,
> their destructors not to run, and you'll essentially be
The problem with your implementation is what happens if R throws an
error. The R longjmp will cause any C++ objects on the stack to leak,
their destructors not to run, and you'll essentially be in a bad place
if you evaluate any R code that might return an error. (For example,
suppose you had a
If I had to guess, maybe there is some initialization that occurs when
your mylib::Simulation object is constructed, and you need to ensure
that code is only run once? (Perhaps the code that defines the program
options needs to be hidden behind an initialization flag, or something
like that)
Thanks -- it looks to me like there is something more fundamentally
wrong with the 'replace_first' and 'replace_last' methods; ie, I don't
think we want to be using 'find_first_of' and 'find_last_of'
functions.
Ie, when writing
string.replace_first("foo", "bar");
I imagine we want to
It sounds like you just need to declare that your package depends on
C++11 in the standard way:
- Add 'SystemRequirements: C++11' to your DESCRIPTION file,
- Create files at 'src/Makevars[.win]', and make sure you have CXX_STD = CXX11
This is documented in more detail in R-exts: see
What about having a 'configure' script that generates this header file
on package install?
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Configure-and-cleanup
On Sun, Feb 28, 2016 at 11:18 AM, Baptiste Auguie
wrote:
> Dear Rcpp gurus,
>
> In the process
I think this needs to be _WIN32 rather than WIN32. Thanks for pointing this out!
On Thu, Feb 11, 2016 at 2:41 PM, Jonathon Love wrote:
> hi dirk,
>
> i've been compiling RInside on windows with the new RTools based on GCC 4.9.
> with stock settings, this all compiles
running under
`gctorture()`...
Kevin
On Sat, Jan 30, 2016 at 7:07 AM, Qiang Kou <q...@umail.iu.edu> wrote:
> Another thing confused me is the segfault only happens when the
> IntegerVector is significantly long.
>
> Best,
>
> KK
>
> On Sat, Jan 30, 2016 at 2:57 AM, Kev
When I add some debug printing to the associated subscripting line
(https://github.com/awalker89/openxlsx/blob/b92bb3acdd6ea759be928c298c6faeef2f26fa3e/src/cppFunctions.cpp#L2608),
I see:
colNumbers.size(): 98,03,150
charCols.size(): 95,94,546
It looks to me like the package is erroneously
A C++ stack trace would be very helpful. Can you try running R with gdb, e.g.
R -d gdb -f example.R
where 'example.R' is the path to your script that reproduces the
segfault? Hopefully, 'gdb' can provide more context on where the error
is occurring.
For what it's worth, the file did open
lib/R/lib/libR.so
> #19 0x7792bcef in Rf_eval () from /usr/lib/R/lib/libR.so
> #20 0x7792f52e in ?? () from /usr/lib/R/lib/libR.so
> #21 0x7792bf0d in Rf_eval () from /usr/lib/R/lib/libR.so
> #22 0x7795422a in Rf_ReplIteration () from /usr/lib/R/lib/libR
Hi Guillaume,
Compiling with the Makevars you provided, I see a number of warnings
related to sign conversion and loss of integer precision (due to the
use of `-Wconversion` in the Makevars).
I'll add an issue on the GitHub issue tracker just so we don't lose sight of it.
Thanks,
Kevin
On Mon,
You could try building clang yourself with UBSAN and testing with that
to see if you can reproduce; I have a script that mostly automates the
installation from trunk here:
https://github.com/kevinushey/etc/blob/master/Mac/install-llvm.sh
I think Apple's fork of clang has been a bit behind in
You'll have to share your package if you want more complete help, but some
of my responses are inline. My best guess is you have a funky configure
script or something to that effect.
On Mon, Jul 6, 2015 at 10:10 AM, Peng Yu pengyu...@gmail.com wrote:
Hi, I made a package using Rcpp and FORTRAN.
Indeed. I think this has been requested before to R-Core (adding
'inst/include' by default), but at the time they weren't willing to make
such a change. There's a chance they would still be receptive given a
suitable patch, though.
On Fri, Jun 12, 2015 at 10:24 AM Tim Keitt tke...@utexas.edu
Fabio,
Is it possible that RcppGSL.h is getting included before that header
file is included? If that were the case, that would imply Rcpp.h
would be getting #include'd before you're able to make your as / wrap
specializations.
Just a guess...
Kevin
On Thu, May 21, 2015 at 10:15 AM, Dirk
That `R_running_as_main_program` error should be fixed R 3.2.0-patched.
See: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=15899
If that hot-fix helps then that's good; otherwise, I would suggest
users patching their R headers after installation.
Kevin
On Fri, May 15, 2015 at 6:42 PM,
Hi Daniel,
Unfortunately, you cannot use // [[Rcpp::export]] to automagically export
template functions.
The general alternative approach is to define a template implementation,
and then dynamically dispatch to that implementation, e.g.
template typename T
void doStuffImpl() { ... }
with
/setdiff.h#L80
On Fri, Jan 2, 2015 at 9:22 PM, Kevin Ushey kevinus...@gmail.com wrote:
Hi Søren,
Thanks for the bug report -- it looks like you're right, `setequal` is
broken, and we never knew about it because we don't have any unit
tests for it. Whoops!
I'll take a look at what's going
Hi Søren,
Thanks for the bug report -- it looks like you're right, `setequal` is
broken, and we never knew about it because we don't have any unit
tests for it. Whoops!
I'll take a look at what's going on and commit a fix + tests soon --
for now, you can use the workaround with `setdiff` which
Hi Wush,
Thanks for investigating this, and I would certainly welcome a fix /
tweak to the END_RCPP macro to avoid this potential memory leak.
However, I am also curious -- where exactly does this memory leak
occur, what exactly is being leaked, and why does your modified
example avoid it?
My
I think John's advice is spot on here. The issue is only seen when
`NDEBUG` is not defined.
I can reproduce the crash (assertion failure) by ensuring I have
CXXFLAGS=-UNDEBUG
in my ~/.R/Makevars. Note that:
1. An assertion failure from Eigen implies you are doing something
that you should
If we were to have these vectors as part of the shared object rather
than header-only, wouldn't this imply breakage for existing packages
if newer versions of Rcpp changed the Vector template class
implementation (perhaps it inherits new policies, or gains new
methods, or methods change, or
Hi Xiao,
I can reproduce the error -- but why do you have the includes as such, e.g.:
#include R.h
#include float.h
#include R_ext/Linpack.h
#include R_ext/Applic.h /* for the QR routines */
#include R_ext/Utils.h /* for the *sort() routines */
#include stdio.h
#include RcppArmadillo.h
Hi Christian,
Thanks for catching this. I think this is an oversight -- this should
return `R_len_t` as well. Or, when long vector support is implemented,
`R_xlen_t` should be used instead (especially since `ListOfT` is
more-or-less a fancy interface over a `List` object)
Just pushed a
The general prescription is:
1. Try running the code with `gctortue(TRUE)` on,
2. Try running with a debugger (gdb, lldb, valgrind),
3. Try running with sanitizers (see e.g. Dirk's docker containers:
https://github.com/eddelbuettel/docker-ubuntu-r)
This should help provide you (and/or us) enough
| |
| |
| | |
| | | On Sat, Aug 9, 2014 at 3:02 PM, Kevin Ushey
kevinus...@gmail.com
| wrote:
| | |
| | | Hi Terrance,
| | |
| | | Can you please try to construct a reproducible example
based
Hi Terrance,
Can you please try to construct a reproducible example based on the
(tagged, potentially offending) line of code -- that is,
#4 0x7f79b6541df0 in IGMRFDPMIX
/data/gannet/ripley/R/packages/tests-49x/growfunctions/src/dpmix.cpp:63
which has the line:
C(k,0) =
I think this bit:
The \texttt{clang} and \texttt{clang++} compilers from the LLVM project can
also be used as they are inter-operable with \texttt{gcc} et al. The
\texttt{clang++} compiler is interesting as it emits much more
comprehensible error messages than \texttt{g++} (though \texttt{g++}
useful half a year ago ;)
Cheers,
Kevin
On Sun, Aug 3, 2014 at 1:10 PM, Kevin Ushey kevinus...@gmail.com wrote:
I think this bit:
The \texttt{clang} and \texttt{clang++} compilers from the LLVM project can
also be used as they are inter-operable with \texttt{gcc} et al. The
\texttt{clang
Hi Asis,
Sorry, Rcpp doesn't have vectorized subsetting for rows of a data.frame /
matrix. However, if you want columns, you can use vector subsetting:
http://gallery.rcpp.org/articles/subsetting/
But perhaps we can consider added 'rows', 'cols' helper methods that would
pull out rows and
df.attr(names) ? data.frames do not have a column names attribute.
Neither do matrices, for that matter, which have an (optional) `dimnames`
attribute.
Please see: http://gallery.rcpp.org/articles/setting-object-attributes/,
and also try looking at what e.g. `attributes(data.frame(x=1))`, for
Maybe we need a DataFrameBuilder class that someone could use like so:
DataFrame df = DataFrameBuilder::create()
.add(column 1, col1)
.add(column 2, col2)
.add(column 3, col3);
This could be made as a generic VectorBuilderT class as well.
Or maybe I've been writing
(SEXP x, SEXP y, SEXP z) {
return ListBuilder()
.add(foo, x)
.add(bar, y)
.add(baz, z);
}
/*** R
test_builder(1:5, letters[1:5], rnorm(5))
*/
On Tue, Jul 8, 2014 at 2:49 PM, Kevin Ushey kevinus...@gmail.com wrote:
Maybe we need a DataFrameBuilder class that someone could use like so
Hi Ramon,
Nice to see that there are people stumbling upon Kmisc and finding it
useful ;) It was developed partially in response to new BioConductor
guidelines requiring packages with source code to register the entry
points, and since that's a pain to do manually, and it was possible to
It's tucked away a bit at the bottom of the page, but it brings you here:
https://github.com/jjallaire/rcpp-gallery/wiki/Contributing-to-the-Rcpp-Gallery
On Mon, Jun 9, 2014 at 9:45 AM, Tim Keitt tke...@utexas.edu wrote:
I don't see the contributing link... ;-)
THK
On Mon, Jun 9, 2014
What OS are you running on (Mac, Linux, Windows)? I really can't tease
this out (with Mac + clang) thus far.
On Wed, May 28, 2014 at 9:56 PM, Romain Francois
rom...@r-enthusiasts.com wrote:
Le 29 mai 2014 à 00:35, John Mous john.mo...@gmail.com a écrit :
No luck with gctorture on yet, but I
Hi John,
I think we may have tackled this in some of the latest fixes with the
version of Rcpp on GitHub. Can you try installing that version and
trying again? Ie, try
install.packages(devtools); devtools::install_github(RcppCore/Rcpp)
then try running your code again.
Alternatively,
On 14 May 2014 05:49, Kevin Ushey kevinus...@gmail.com wrote:
Hi Jack,
I've already brought this up with the package maintainer. It's because
they bundle an old, broken version of boost. I asked them to fix it; I
guess they haven't (the BioC build reports also show it failing on
Mavericks
Hi Jack,
I've already brought this up with the package maintainer. It's because
they bundle an old, broken version of boost. I asked them to fix it; I
guess they haven't (the BioC build reports also show it failing on
Mavericks) I've appended a copy of my e-mail at the end of this just
so you
The vignettes build fine for me. Can you provide more information
(perhaps as a GitHub issue)?
I'll take a look at InternalFunction. I think there was something
similar reported earlier.
Cheers,
Kevin
On Sat, May 10, 2014 at 12:44 PM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
On Sat,
PDF file produced!
| Execution halted
| Error: Command failed (1)
|
| On Wed, May 7, 2014 at 1:50 AM, Kevin Ushey kevinus...@gmail.com wrote:
| Hi Gabor,
|
| Looks like it was a bug on our end -- R-exts specifies that USE_CXX1X
| should be set to any value; we try to set
Hi Gabor,
Looks like it was a bug on our end -- R-exts specifies that USE_CXX1X
should be set to any value; we try to set it to nothing (ie, define it
but leave it empty) but apparently that is not accepted.
I just pushed a bug fix to GitHub and it works on my Windows VM; can
you give it another
Hi Azad,
Your first issue is something separate, probably due to clashing
compiler toolchains between compiled versions of R / packages. If you
want to dive into that further you'll need to give us some more
information about your compiler setup.
The second issue, with flowMatch, I believe this
^
Clang does a good job of reporting error messages, so please learn how
to read them and what they are trying to tell you.
Cheers,
Kevin
On Thu, May 1, 2014 at 4:04 PM, Kevin Ushey kevinus...@gmail.com wrote:
Hi Azad,
Your first issue is something separate, probably due to clashing
compiler
my compiler toolchain and see if the problem can be
removed. (I replaced clang++ with g++ for another reason. This process might
create some problem).
Thanks again for your help.
--
Ariful Azad
On Thu, May 1, 2014 at 4:08 PM, Kevin Ushey kevinus...@gmail.com wrote:
Actually, to confirm
Here's some thoughts, from the perspective of a package developer who
might want to use Rcpp11.
One option is to have the Rcpp11 distribution live as a git repository
within the `inst/include` directory of a developer's package. A
package developer could clone the repository (or have it track the
Hi Gregor,
This is probably worth a reminder as you say. Just for reference, the
motivation is that R's internal computations for rexp and rgamma
default to the 'scale' parameterization, rather than the 'rate'
parameterization seen at the R level. Rcpp uses that internal
operation and hence isn't
Hi Gregor, Dirk,
Added here:
https://github.com/RcppCore/Rcpp/commit/f6e7e34b94ba52c1341142a5640d0ede674073c7
Please feel free to tweak for wording / style / clarity :)
Kevin
On Mon, Mar 24, 2014 at 5:05 PM, Dirk Eddelbuettel e...@debian.org wrote:
On 24 March 2014 at 16:45, Kevin Ushey
Hi Jianyang,
If you are willing to put your package on GitHub or somewhere else
publicly accessible, I can take a closer look.
My best guess, from your compiler output, is you're trying to
construct a vector from a proxy, and the compiler can't figure out
what constructor to call. You might want
of gcc are you using in Linux (gcc -v)?
Kevin
On Tue, Mar 11, 2014 at 1:48 PM, Jianyang Zhao uz...@ucdavis.edu wrote:
Hello Kevin,
I use the least version Rcpp and RcppEigen. The github link is at
https://github.com/uzhao/PACE
Thanks,
JIanyang
On Tue, Mar 11, 2014 at 1:36 PM, Kevin Ushey
Do you have a GitHub repository or some other means of sharing your
package, so we can try testing it?
On Mon, Mar 3, 2014 at 6:12 AM, Dirk Eddelbuettel e...@debian.org wrote:
On 3 March 2014 at 14:38, Simon Zehnder wrote:
| Though I couldn't detect NEWS relevant for my package. I have rebuilt
Mar 2014, at 17:53, Kevin Ushey kevinus...@gmail.com wrote:
Do you have a GitHub repository or some other means of sharing your
package, so we can try testing it?
On Mon, Mar 3, 2014 at 6:12 AM, Dirk Eddelbuettel e...@debian.org wrote:
On 3 March 2014 at 14:38, Simon Zehnder wrote:
| Though
and I'll push something to the GitHub
repo in a second.
Cheers,
Kevin
On Mon, Mar 3, 2014 at 11:21 AM, Kevin Ushey kevinus...@gmail.com wrote:
Hi Simon,
I can replicate this, and also fix this, if I change 'const Rcpp::S4
classS4' to 'Rcpp::S4 classS4'. (That is, assuming a simple example
where I
Hi Ian,
I believe this bug has been fixed in the development version
(https://github.com/RcppCore/Rcpp/commit/2b033f6f3ec58922569b7aed65276f9878ca3389).
Can you try installing the latest version of Rcpp on GitHub and
checking if the problem persists?
Thanks,
Kevin
On Mon, Mar 3, 2014 at 11:42
If you want more generic matrix operations, it really is best to use
Armadillo (as per Yixuan's example; note that the constructor he's
using reuses R's memory as well, so it's efficient -- no copy is made,
that object can be modified in place).
However, you could always do something like the
Hi Thell,
Thanks for all the work you've done investigating this. Can you please
consolidate the information you have and post it as an issue here:
https://github.com/RcppCore/Rcpp/issues?state=open?
And, if you're willing to dive in and figure out what exactly is
happening, patches are much
Hi Hideyoshi,
At this line:
if(x(i,exit_col)==1){
I see that exit_col is equal to the number of columns in the matrix,
thereby indexing outside the matrix if 'i' is large enough. Do you
want 'exit_col - 1' instead? Be careful when going from R's 1-based
indexing to C++'s 0-based indexing.
Hi Gregor,
I don't think it's possible at this point. Some technical details follow:
All R data internally is a SEXPREC, ie, a C struct full of different
bits of information. The data part of a SEXPREC is forced to a
specific offset from the C structure, e.g. from Rinternals.h:
/* Under the
Hi Jianyang,
The problem is still there, but as advised by Douglas Bates in his
response, you should just use a copy constructor instead.
http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2012-May/003793.html
There is probably a solution, but I don't know the cleanest way of handling it.
The way around it is to declare 'xx' in the parent scope, and then assign
to it directly, e.g.
// [[Rcpp::export]]
Rcpp::NumericVector f1(String typ){
Rcpp::NumericVector xx;
if(typ==nc){
xx = Rcpp::NumericVector(10);
} else {
xx = Rcpp::NumericVector(20);
}
return xx;
}
Yes, the patch is trivial. Dan, we can try installing the latest version of
Rcpp on GitHub on the BioC Mac build machine and confirm that these
packages do build on Mac with llvm-g++4.2. And I agree that either 1. CRAN
needs to rebuild the binaries for packages linking to Rcpp, or 2. these
package
I will see if I can take a deeper look at this soon, but
unfortunately, I do not have access to an older Mac machine. For
reference, I am able to successfully compile and check mzR 1.9.3 using
Apple clang; however, I had to modify the Boost source included in the
package a bit to get it to work.
1 - 100 of 150 matches
Mail list logo