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):
Hi, everyone
I met a trouble, not only about R, but Python+RPy2+R
When I run from rpy2 import robjects or other packages/codes,
I receive Segmentation Fault inevitably like this:
linux-yhwx:/ # python
Python 2.7.2 (default, Aug 19 2011, 20:41:43) [GCC] on linux2
Type help, copyright, credits or
Please use the appropriate mailing list (Rcpp-devel) for Rcpp questions.
Romain
Le 14 mai 2013 à 06:42, Xiao He praguewaterme...@gmail.com a écrit :
Dear R-Developers,
I just started learning how to use Rcpp. Earlier while using it, I
encountered an error as shown below:
On 13 May 2013 at 21:42, Xiao He wrote:
| 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,
If you are fine with another package doing the legwork for you, calling an R
function from C++ is very easy:
R library(Rcpp)
R cppFunction('NumericVector fun(NumericMatrix X, NumericVector y, Function s)
{ return s(X, y); }')
R set.seed(42); solve(matrix(rnorm(9),3,3), rep(1,3))
[1] -0.778649
Thank you!
I will send my reply to Rcpp-devel from now on Re: my question -. Since I
thought cppFunction() allows vectorized operations, I thought any R
functions I call from R would also allow it. pbeta() within R can be
specified as pbeta(runif(10), 1, 2) where the first argument is a vector.
On 14 May 2013 at 06:47, Xiao He wrote:
| Thank you!
|
| I will send my reply to Rcpp-devel from now on Re: my question -. Since I
| thought cppFunction() allows vectorized operations, I thought any R functions
I
| call from R would also allow it. pbeta() within R can be specified as pbeta
|
Shouldn't the F statistic (and p value) for the x2 term in the following calls
to anova() and add1() be the same? I think anova() gets it right and add1()
does not.
d - data.frame(y=1:10, x1=log(1:10), x2=replace(1/(1:10), 2:3, NA))
anova(lm(y ~ x1 + x2, data=d))
Analysis of Variance Table
Hi Martin,
On 05/14/2013 08:44 AM, Martin Maechler wrote:
[...]
PS: Are there other suggestions to help people *stop* using
ifelse(A, B, C)
in those many places where they should use
if(A) B else C
?
Or to help people stop using
if (... ...)
if (... | ...)