Displaying 5 results from an estimated 5 matches for "asint".
Did you mean:
apint
2009 Dec 22
0
Rcpp 0.7.0: R/C++ integration now even easier
...ple of using GNU GSL functions for illustrative purposes (as you
wouldn't need this to access random-number generators as R has its own).
Consider this R code snippet:
## use Rcpp to pass down a parameter for the seed, and a vector size
gslrng <- '
int seed = RcppSexp(s).asInt();
int len = RcppSexp(n).asInt();
gsl_rng *r;
gsl_rng_env_setup();
std::vector<double> v(len);
r = gsl_rng_alloc (gsl_rng_default);
gsl_rng_set (r, (unsigned long) seed);
for (int i=0; i<len; i++) {
v[i] = gsl_rng_get (r);...
2009 Dec 22
0
Rcpp 0.7.0: R/C++ integration now even easier
...ple of using GNU GSL functions for illustrative purposes (as you
wouldn't need this to access random-number generators as R has its own).
Consider this R code snippet:
## use Rcpp to pass down a parameter for the seed, and a vector size
gslrng <- '
int seed = RcppSexp(s).asInt();
int len = RcppSexp(n).asInt();
gsl_rng *r;
gsl_rng_env_setup();
std::vector<double> v(len);
r = gsl_rng_alloc (gsl_rng_default);
gsl_rng_set (r, (unsigned long) seed);
for (int i=0; i<len; i++) {
v[i] = gsl_rng_get (r);...
2003 Jan 08
2
Undocumented bahavior of as.integer() (PR#2430)
as.integer() truncates doubles toward zero, as Splus does (at least v. 6.1
under Windows does). Thus:
> look <- (10 * seq(14)) - 76
> 10 * (73.1 + look)
[1] 71 171 271 371 491 586 681 791 886 981 1101 1201 1301 1401
> as.integer(10 * (73.1 + look))
[1] 70 170 270 370 490 586 681 791 886 981 1101 1201 1301 1401
... It is not documented in R! I propose appending
2007 Mar 28
4
Rmpi and OpenMPI ?
Has anybody tried to use Rmpi with the OpenMPI library instead of LAM/MPI?
LAM appears to be somewhat hardcoded in the Rmpi setup. Before I start to
experiment with changing this, has anybody else tried Rmpi with non-LAM MPI
implementations?
Dirk
--
Hell, there are no rules here - we're trying to accomplish something.
-- Thomas A. Edison
2011 Mar 07
1
Rmpi fails to install
I try to install Rmpi as root with install.packages("Rmpi").
It fails with:
...
checking for x86_64-pc-linux-gnu-gcc -std=gnu99 option to accept ISO
C89... none needed
I am here /usr and it is OpenMPI
Trying to find mpi.h ...
Found in /usr/include
Trying to find libmpi.so or libmpich.a ...
Found libmpi in /usr/lib
checking for openpty in -lutil... yes
checking for main in -lpthread...