Displaying 20 results from an estimated 10000 matches similar to: "How to convert time_t to R date object"
2013 May 14
2
invalid operands of types ‘SEXPREC*’ and ‘R_len_t’ to binary ‘operator/’ with Rcpp.
Dear R-Developers,
I just started learning how to use Rcpp. Earlier while using it, I
encountered an error as shown below:
file74d8254b96d4.cpp: In function ‘Rcpp::NumericVector
foo(Rcpp::NumericVector, Rcpp::NumericVector, Rcpp::NumericVector,
Rcpp::Function, Rcpp::Function)’:
file74d8254b96d4.cpp:10: error: invalid operands of types ‘SEXPREC*’ and
‘R_len_t’ to binary ‘operator/’
make: ***
2015 Mar 02
3
R-devel does not update the C++ returned variables
On 2 March 2015 at 09:09, Duncan Murdoch wrote:
| I generally recommend that people use Rcpp, which hides a lot of the
| details. It will generate your .Call calls for you, and generate the
| C++ code that receives them; you just need to think about the real
| problem, not the interface. It has its own learning curve, but I think
| it is easier than using the low-level code that you need to
2015 Mar 02
1
R-devel does not update the C++ returned variables
On 2 March 2015 at 16:37, Martin Maechler wrote:
|
| > On 2 March 2015 at 09:09, Duncan Murdoch wrote:
| > | I generally recommend that people use Rcpp, which hides a lot of the
| > | details. It will generate your .Call calls for you, and generate the
| > | C++ code that receives them; you just need to think about the real
| > | problem, not the interface. It has its own
2018 Mar 19
1
help needed on RcppEigen....
dear members,
I am using R to model stock prices but a slow "for" loop has stifled my research.
I am using Rcpp to speed up my "for" loop. I am also using RcppEigen to implement block operations on xts objects.....
how do I use RcppEigen? If I just load it by:
> require(RcppEigen)
it is not recognising the .block method in C++.
If I include it inside
2015 Mar 02
3
R-devel does not update the C++ returned variables
On 03/02/2015 04:37 PM, Martin Maechler wrote:
>
>> On 2 March 2015 at 09:09, Duncan Murdoch wrote:
>> | I generally recommend that people use Rcpp, which hides a lot of the
>> | details. It will generate your .Call calls for you, and generate the
>> | C++ code that receives them; you just need to think about the real
>> | problem, not the interface. It has its
2013 Jun 20
1
compiling Rcpp with 3.0.1 on Solaris 10
Hello
My colleagues asked me to install "R" with module "shiny".
R version 3.0.1 compiled fine on Solaris 10 and is running well.
I tried to install "shiny". With the dependencies "Rcpp" should be installed before. But the compile step did fail. See below.
The initial error message is "Error in dyn.load(file, DLLpath = DLLpath, ...) :"
Before
2013 Jun 21
1
compiling Rcpp with 3.0.1 on Solaris 10
Hello
My colleagues asked me to install "R" with module "shiny".
R version 3.0.1 compiled fine on Solaris 10 and is running well.
I tried to install "shiny". With the dependencies "Rcpp" should be installed before. But the compile step did fail. See below.
The initial error message is "Error in dyn.load(file, DLLpath = DLLpath, ...) :"
2016 Jan 10
3
coerce SEXP type to C++ matrix class and back
Dear all,
I am testing a simple C++ function that takes a double matrix as
argument and which uses routines provided by the C++ Armadillo
package. I am aware of the nice capabilities of Rcpp and RcppArmadillo
which helps simplifying a lot and that I have already successfully
tested. However, I had a hard time trying to figure out how the
coercion from a REALSPX matrix to an arma::mat =
2024 Mar 09
3
Bug#1065794: xen: FTBFS on armhf: xenstored_control.c:646:70: error: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘time_t’ {aka ‘long long int’} [-Werror=format=]
Source: xen
Version: 4.17.3+10-g091466ba55-1.1
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: sramacher at debian.org
https://buildd.debian.org/status/fetch.php?pkg=xen&arch=armhf&ver=4.17.3%2B10-g091466ba55-1.1&stamp=1709892742&raw=0
xenstored_control.c:646:70: error: format ?%ld? expects argument of
2015 Nov 03
1
Fwd: Rcpp sugar dpois
Hi. Here is a piece of cpp code.
It works, but I do not understand the rational for the use of
"R::dpois" to call the function dpois since in the examples I have always
found directly "dpois" or "Rcpp::dpois" that both do not work in my code.
Could anyone be so patient to explain me why should it be like that?
Thaks a lot, Enrico
#include <Rcpp.h>
using
2014 Jan 15
1
rbinom in RcppArmadillo?
What is the RcppArmadillo way to make binomial draws from a vector of probs,
similar to what rbinom does in R?
Thanx!
--
View this message in context: http://r.789695.n4.nabble.com/rbinom-in-RcppArmadillo-tp4683593.html
Sent from the R devel mailing list archive at Nabble.com.
2016 Nov 12
2
Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
On 12 November 2016 at 07:59, Dirk Eddelbuettel wrote:
|
| On 12 November 2016 at 14:23, Kirill M?ller wrote:
| | Thanks. I have now CXX = g++ -std=c++98 in my /etc/R/Makeconf, it's
| | picked up properly. I can only assume that the last -std= option wins if
| | more than one are given on the same command line [1].
|
| Good to know it works.
|
| I am still a little puzzled why it was
2024 Feb 05
7
Bug#1063270: xen: NMU diff for 64-bit time_t transition
Source: xen
Version: 4.17.3+10-g091466ba55-1
Severity: serious
Tags: patch pending sid trixie
Justification: library ABI skew on upgrade
User: debian-arm at lists.debian.org
Usertags: time-t
NOTICE: these changes must not be uploaded to unstable yet!
Dear maintainer,
As part of the 64-bit time_t transition required to support 32-bit
architectures in 2038 and beyond
2013 Nov 26
1
dynamic lists at C level
Dear R-devel,
I am trying to do something similar to dynamic length lists in R, but
at C level.
In R, that would be rather trivial:
- determine the length of the list
- create the list object
- store the values for each component
- access value components by using "[["
At C level, for a single component where I need to store a vector of
length 5, I do:
int *p_result;
SEXP my_list =
2023 Apr 12
1
Matrix scalar operation that saves memory?
One possibility might be to use Rcpp.
An R matrix is stored in contiguous memory, which can be considered as a
vector.
Define a C++ function which operates on a vector in place, as in the
following:
library(Rcpp)
cppFunction(
'void subtractConst(NumericVector x, double c) {
for ( int i = 0; i < x.size(); ++i)
x[i] = x[i] - c;
}')
Try this function out on a matrix. Here we
2015 Mar 02
2
R-devel does not update the C++ returned variables
Thanks! I went through the online posts which supports the power of .Call
over .C. But my probably naive question is why does this work for my code
with R but not R-devel?
And another question is related to using .Call. Based on the manual page, I
do not need to change the function parameters when using .Call. So I can
run like this:
.Call("sppedUp", D, S, pD, pS, nrow(D), as.integer(N),
2023 Apr 12
1
Matrix scalar operation that saves memory?
I doubt that R's basic matrix capabilities can handle this, but have a look
at the Matrix package, especially if your matrix is some special form.
Bert
On Tue, Apr 11, 2023, 19:21 Shunran Zhang <szhang at ngs.gen-info.osaka-u.ac.jp>
wrote:
> Hi all,
>
> I am currently working with a quite large matrix that takes 300G of
> memory. My computer only has 512G of memory. I
2016 Nov 12
3
Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
Thanks. I have now CXX = g++ -std=c++98 in my /etc/R/Makeconf, it's
picked up properly. I can only assume that the last -std= option wins if
more than one are given on the same command line [1].
-Kirill
[1] http://stackoverflow.com/q/40563269/946850
On 12.11.2016 03:01, Dirk Eddelbuettel wrote:
> On 11 November 2016 at 23:48, Kirill M?ller wrote:
> | After upgrading to Ubuntu
2017 Dec 18
2
Rcpp - Linking to DLL from another package?
Hi,
I am trying to make a package B that extends another package A. Package A uses Rcpp, and I want to extend a class X used there.
So package A has
src/X.h and inst/include/X.h
class X
{ ... }
src/X.cpp
X::X( arguments )
{ ... }
My package B wants to do this:
DESCRIPTION
[...]
LinkingTo: Rcpp, RcppArmadillo, A
Imports: Rcpp, RcppArmadillo, A
src/Y.h
class Y: public X
{ ... }
src/Y.cpp
2015 May 18
2
[Y2038] kernel/libc uapi changes for y2038
On Monday 18 May 2015 12:16:48 Thorsten Glaser wrote:
> Arnd Bergmann dixit:
>
> >In the patch series I posted recently [1], I introduce new system calls to deal
> >with modified data structures, but left the question open on how these should
> >be best accessed from libc. The patches introduce a new __kernel_time64_t type
>
> Can we please have ioctls fixed for