an
you do it differently ?
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://addictedtor.free.fr/graphiques
blog:http://romainfrancois.blog.free.fr
|- http://bit.ly/xbKv0R : Crawling facebook with R
|- http://bit.ly/v3WB8S : ... And now fo
eturn false ;
int n = Rf_length(names) ;
for( int i=0; iif( !strcmp( target, CHAR(STRING_ELT(names, i)) ) ) return
true ;
}
return false ;
}
It would be awesome if someone would contribute a unit test for this
feature based on the inline snippet
Le 29/03/12 19:51, Patrick Burns a écrit :
On 29/03/2012 18:33, Dirk Eddelbuettel wrote:
On 29 March 2012 at 19:12, Romain Francois wrote:
| Le 28/03/12 13:56, Ulrich Bodenhofer a écrit :
|> Hi,
|>
|> My question is the following: is there any way of checking in
whether a
|> com
Le 29/03/12 20:18, Dirk Eddelbuettel a écrit :
On 29 March 2012 at 18:51, Patrick Burns wrote:
| On 29/03/2012 18:33, Dirk Eddelbuettel wrote:
|>
|> On 29 March 2012 at 19:12, Romain Francois wrote:
|> | Le 28/03/12 13:56, Ulrich Bodenhofer a écrit :
|> |> Hi,
|> |>
ace the line "fTouch = testFun()" with a native call to R "fTouch =
list(testVar = 10)" then everything works fine. Also returning a NumericVector instead of a
list also works fine -- the issue seems to appear after encapsulating the return value in a list
inside of Rcp
NumericVector instead of a
list also works fine -- the issue seems to appear after encapsulating the return value in a list
inside of Rcpp.
I am using R 2.14.2 on Win32& Win64. Rcpp version 0.9.10.
Thanks,
Ilya
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph G
.
Romain
Le 31/03/12 11:35, Romain Francois a écrit :
Some head scratching this morning.
If I have this:
return Rcpp::List::create(Rcpp::Named( "testVar" ) = 10 ) ;
instead of:
return Rcpp::List::create(Rcpp::Named( "testVar" ) = wrap(10) ) ;
everything runs smoothly.
So my gu
Le 13/09/12 17:56, Tim Triche, Jr. a écrit :
conclusion: Romain Francois is an absolute beast of a programmer
I'll put this on my grave.
This was indeed crazy times where all that mattered was to get more and
more and more into Rcpp.
A stupid-ish question: how do ReferenceClasses map
s method definition for method value()
## [...]
- - - - 8< - - - -
The fact that 'x[["value"]]' finds the method only if I've first done
'x$value' seemed odd.
Thanks,
Ben.
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http:
inter)
> x
C++ object <0x1006e1e20> of class 'Foo' <0x1006ccb60>
> y
C++ object <0x10330cc00> of class 'Foo' <0x1006ccb60>
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
blog:
I continued this, and now we can also expose free functions returning
pointers. For example:
Foo* make_foo(){ return new Foo(3, 4) ; }
See svn version of RcppBDT for a real example.
Romain
Le 23/10/12 15:55, Romain Francois a écrit :
Hello,
I've added the possibility for exposed class
ted the function body with inline and it compiles and runs perfectly.
Is there something I should specify so that the Rcpp library objects initialise
correctly?
Thanks a lot for any feedback,
Josh
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://galler
;,
plugin = "Rcpp",
verbose = TRUE)
nn <- 1
benchmark(byRow(nn), byCol(nn),
columns=c("test", "replications", "elapsed", "relative",
"user.self", "sys.self&qu
uld sample sugar expressions :-)
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog:http://romainfrancois.blog.free.fr
|- http://bit.ly/RE6sYH : OOP with Rcpp module
tion(s) for inclusion in RcppArmadillo
(Dirk Eddelbuettel)
4. Re: Sample function(s) for inclusion in RcppArmadillo
(Romain Francois)
--
Message: 1
Date: Wed, 14 Nov 2012 06:42:15 -0600
From: Dirk Eddelbuettel
To:
n to numeric on top of the
price you pay for calling back into R.
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog:http://romainfrancois.blog.free.fr
|- http://bit.ly/RE
ot;just" sits on top of Rcpp modules which you may
have
looked at in the past --- and these provide essentially mostly
pass-through
declarations.
JJ will follow-up in a bit with more nitty-gritty.
Cheers, Dirk
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery:
0.015
Romain
Le 15/11/12 00:08, Søren Højsgaard a écrit :
Thanks! What I need to do is this
match(c("b","k"), letters)
[1] 2 11
Regards
Søren
-Original Message-
From: rcpp-devel-boun...@lists.r-forge.r-project.org
[mailto:rcpp-devel-boun...@lists.r-forge.
ome dummy classes that prints on
copy constructor to see how many times it is used, etc ...
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog:http://romainfrancois.blo
this goes into the
next version of Rcpp? That would be nice.
Regards
Søren
-Original Message-
From: Romain Francois [mailto:rom...@r-enthusiasts.com]
Sent: 15. november 2012 00:50
To: Søren Højsgaard
Cc: rcpp-devel@lists.r-forge.r-project.org
Subject: Re: [Rcpp-devel] Rcpp "versi
ion gets better the second time. I guess R
keeps its hash table somewhere.
Romain
Le 15/11/12 08:36, Søren Højsgaard a écrit :
Thanks a lot; that seems elegant. Could one imagine that this goes into the
next version of Rcpp? That would be nice.
Regards
Søren
-Original Message-
From: R
)
[1] Inf
> sum1(x)
[1] Inf
> sum2(x)
[1] Inf
> sum2a(x)
[1] Inf
> sum3(x)
[1] Inf
> sum4(x)
[1] Inf
> x <- c(1, 2, NA )
> sum(x)
[1] NA
> sum1(x)
[1] NA
> sum2(x)
[1] NA
> sum2a(x)
[1] NA
> sum3(x)
[1] NA
> sum4(x)
[1] NA
So, not sure why we should pa
Le 15/11/12 15:14, Hadley Wickham a écrit :
On Thu, Nov 15, 2012 at 8:11 AM, Romain Francois
wrote:
I'm not getting the same results, so I might not make the same conclusions:
Unit: microseconds
exprmin lq median uqmax
1 sum(x) 16.072 16.161 16.2090 16.3110 2
^^.
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog:http://romainfrancois.blog.free.fr
|- http://bit.ly/RE6sYH : OOP with Rcpp modules
`- http://bit.ly/Thw7IK : Rcpp modules more
ov 15, 2012 at 3:24 PM, Romain Francois
mailto:rom...@r-enthusiasts.com>> wrote:
Le 15/11/12 14:52, Hadley Wickham a écrit :
R
utilisateur système écoulé
0.338 0.024 0.362
R (second time)
utilisateur
on't care where the data is on the
table, we just want to know if it is there.
Might be interesting at some point to check alternatives to the standard
hasing functions... e.g. play with sparsehash:
http://code.google.com/p/sparsehash/
Romain
--
Romain Francois
Professional R Enthusiast
Le 15/11/12 17:52, Romain Francois a écrit :
Hello,
I've commited an Rcpp version of %in%.
For example:
require(Rcpp)
require(microbenchmark)
sourceCpp( code = '
#include
using namespace Rcpp ;
// [[Rcpp::export]]
LogicalVector in_( CharacterVector x, CharacterVector table){
e" in c++.
Best regards
Søren
Hmmm - see http://cran.r-project.org/web/packages/fastmatch/index.html
Hadley
PS. Would you be interested in a set of R functions that from a quick skim of
the R sources that I think could be much much faster if implemented in Rcpp?
--
RStud
x.begin(), out_it = out.begin(); x_it != x.end();
x_it++, out_it++) {
*out_it = ISNA(*x_it);
}
return(out);
}
')
is_na2(c(NA, 5.4, 3.2, NA))
Rcpp provides a helper function called `is_na` that works similarly to
`is_na2` above, producing a logical
Le 16/11/12 14:00, Hadley Wickham a écrit :
On Fri, Nov 16, 2012 at 2:25 AM, Romain Francois
wrote:
Thanks for exploring these issue. This looks very useful.
I get:
str( first_log(NA) )
logi TRUE
str( first_int(NA_integer_) )
int NA
str( first_num(NA_real_) )
num NA
str
groups.begin();
NumericVector::iterator o_it = out.begin();
for(; g_it != groups.end(); ++g_it, ++o_it) {
*o_it = as(fun(wrap(*g_it)));
}
I'd appreciate any hints as to how to solve this particular problem,
as well as any general debugging strategies.
Thanks!
Hadle
ugh at first I also learned many tricks from Meyers' Effective STL.
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog:http://romainfrancois.blog.free.fr
2;
return dd;
}
// [[Rcpp::export]]
int f3(const Rcpp::IntegerMatrix m1) {
int dd = m1(0, 0) * 2;
return dd;
}
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog:
ng function performs better.
...
Not giving up
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog:http://romainfrancois.blog.free.fr
|- http://bit.ly/RE6sYH : OOP wi
peed up this
recovery and be compatible with the new version? How much change should
I expect?
Thanks.
All the best,
baptiste
* https://github.com/baptiste/cda
http://cran.r-project.org/web/packages/cda/index.html
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Gra
ld really get into a proper testing
framework. In the meantime, I'll be writing a few tests with Hadley's
testthat.
All the best,
baptiste
I'm looking at this issue now. Thanks for providing the example with
euler. This is helpful.
On 17 November 2012 11:20, Romain Francois mail
list(c("a","b"),c("b","c"), c("a","c","e"), c("a","c","q")),
letters[1:10])
0xca858e0
0xca85cd0
0xd715d80
0xd715db8
[[1]]
[1] 1 2
[[2]]
[1] 2 3
[[3]]
[1] 1 3 5
[[4]]
[
][,3]
[1,] -0.4377827 -0.8982855 0.03780919
[2,] -0.3894132 0.1515423 -0.90851102
[3,] 0.8103726 -0.4124538 -0.41614684
[1] 3 3
[1] "matrix"
[,1] [,2][,3]
[1,] -0.4377827 -0.8982855 0.03780919
[2,] -0.3894132 0.1515423 -0.90851102
[3,] 0.8103726 -0.41
On 17 November 2012 12:44, Romain Francois mailto:rom...@r-enthusiasts.com>> wrote:
This is about one of C++ most annoying things. order of includes.
To make it short, the function that is responsible for making an R
object out of the returned arma::mat is module_wrap, wh
Both pdist4 and pdist5 are undeterminate behaviour.
I would prefer to keep it that way and document it that vector should
have the same size, ... rather than introduce the extra cost of recyling.
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http
;
out[0] = NA_STRING ;
return out ;
}')
Not as convenient. :-/
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog:http://romainfrancois.blog.free.fr
|- htt
ys) {
return pow((ys - x), 2);
}
')
all.equal(pdist1(0.5, ys), pdist5(0.5, ys))
# Where are the missing values coming from??
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm S
341.235
3 pdist3(0.5, ys) 262.306 262.7620 262.9740 263.8560 565.902
4 pdist4(0.5, ys) 264.561 264.9355 265.1850 266.8125 858.453
5 pdist5(0.5, ys) 15.700 16.1570 16.4030 17.2045 318.126
6 pdist6(0.5, ys) 31.264 31.5755 31.7225 32.3770 332.139
Romain
Le 17/11/12 17:40, Romain Francois a écrit
be nice to have some sort of declarative syntax like:
recycle(x, y, z);
Hadley
In a way, we can already use sugar rep_len.
rep_len( x, 30 )
will recycle x into a vector of length 30, lazily.
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-e
Le 18/11/12 15:35, Hadley Wickham a écrit :
On Sat, Nov 17, 2012 at 9:23 AM, Romain Francois
wrote:
Le 17/11/12 15:22, Hadley Wickham a écrit :
Hi all,
Am I doing something wrong with the functions below, or has this
behaviour not yet been implemented in Rcpp?
cppFunction(
includes=headers,
body=sources,
plugin="RcppMpfr",
verbose=FALSE)
Sample Function Benchmark
timings <-
benchmark( factorial( mpfr(93,255) ),
mpreal_factorial(93,255),
Rmpfr::factorialMpfr
The thing about #elseif has been fixed on the development version a few days
ago. Can you try again with the scn version of rcpp ?
Also, if you use c++11 features, you are on your own. We will happily do c++11
code when we get some sort of green light from cran, which might take years.
Romain
Yes. That´s it, and this is fixed in the current devel version of Rcpp.
Romain
Envoyé de mon iPhone
Le 19 nov. 2012 à 19:40, Chris Jefferson a écrit :
> On 19/11/12 17:33, Thell Fowler wrote:
>>
>> /home/thell/R/library/Rcpp/include/Rcpp/sugar/sets.h:28:2: error:
>> invalid preprocessing dir
ividual unique1 methods, but I'd like to keep it
simple for now).
Thanks!
Hadley
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog:http://romainfrancois.blog.free
pmax( b, pmin( a, x ) )
I'm thinking of naming it pminmax. Any better idea ?
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog:http://romainfrancois.blog.free.fr
with the correct signature, dealing with
individual elements. Similar idea.
Hence I would prefer to invoke the 80/20 rule as I think we have better
targets to chase than to narrow that gap. But that's just my $0.02...
If you can't sleep til both version have 20-some micros
for me :-)
How about clip():
p = clip(p, 0.0, 1.0);
I like "clip".
This is such a common operation that I'm surprised R doesn't already
have a function like this!
Darren
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http:/
/12 14:22, Alexandre Bujard a écrit :
How about clip():
p = clip(p, 0.0, 1.0);
Great idea!!!
On Wed, Nov 21, 2012 at 2:00 PM, Romain Francois
mailto:rom...@r-enthusiasts.com>> wrote:
Le 21/11/12 13:22, Darren Cook a écrit :
I wrote:
P.S. I don'
ives and opportunities. This resulted in
some improvements in Rcpp about the assuignment operator in Vector and
pmin and pmax which just needed a fresh look.
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`-
speed, apart from the logical
case, which I find surprising given that it should have the least
copying to do.
Hadley
Then I was guessing wrong and the compiler performs optimization.
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusias
ExposedFunction( DataFrame df ){
int n = df.size() ;
for( int i=0; i> df <- data.frame( a = integer(10), b = character(10),
stringsAsFactors = FALSE )
> ExposedFunction( df )
dealing with an object of type: Rcpp::Vector<13>
dealing with an object of type: Rcpp::Vector<16&
SET set(vector.begin(), vector.end());
return Vector out( set.begin(), set.end() ) ;
}
But the range constructor for Vector does not do what I want. I'm
looking into it.
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-
CPLXSXP and VECSXP .
I have this as RcppScript now on my ~/bin:
#!/usr/bin/Rscript
require(Rcpp, quietly = TRUE)
args <- commandArgs(TRUE)
file <- tail( args, 1 )
sourceCpp( file )
So I run this file as
$ RcppScript /tmp/unique2.cpp
[1] 2.4 1.0 5.3
[1] 1 2
[1] "b" "a&qu
.
There is no other way I know about.
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog:http://romainfrancois.blog.free.fr
|- http://bit.ly/RE6sYH : OOP with
se
Linux version 4. This is for our cluster, so it is not easy for me to
update.
Kasper
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Romain Francois
Profe
his.
I'll look this over, Hadley, once things settle down. Thanks for your
efforts on this!
You're welcome, and any feedback will be greatly appreciated.
Hadley
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
sting the normal case }
END_RCPP
}
?
Not so terrible -- especially if you have some Rcpp snippets set up in
your editor of choice, no?
-steve
We are discussing ways around this issue.
I think we can do something that would work on windows and not require
us writing boiler plate stuff.
Romain
--
Ro
StringCompare {
| public:
| -inline bool operator()( SEXP x, SEXP y){
| +inline bool operator()( SEXP x, SEXP y) const {
| return strcmp( char_nocheck(x), char_nocheck(y) ) < 0 ;
| }
| } ;
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: h
r (ii = 0; ii < ncX; ii++) {
indegree[ii] = 0; flag[ii] = 0; ans[ii] = 0;
}
for (jj = 0; jj < ncX; jj++)
for (ii = 0; ii < ncX; ii++)
indegree[jj] = indegree[jj] + X.coeff(ii,jj);
/* Rcout<<"indegree: ";for (ii=0;ii
--
Romain Franco
mbiguate it at runtime and
then let the template do its job.
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog:http://romainfrancois.blog.free.fr
|- http://bit.l
ncy of the coding?
Thanks.
Best wishes!
Honglang Wang
Office C402 Wells Hall
Department of Statistics and Probability
Michigan State University
1579 I Spartan Village, East Lansing, MI 48823
wangh...@msu.edu <mailto:wangh...@msu.edu>
--
Romain Francois
Professional R Enthusiast
+33(0)
ility
Michigan State University
1579 I Spartan Village, East Lansing, MI 48823
wangh...@msu.edu <mailto:wangh...@msu.edu>
On Tue, Dec 4, 2012 at 2:19 PM, Romain Francois
mailto:rom...@r-enthusiasts.com>> wrote:
You are calling back to R using Function. This is expensive.
What is
’
which should give you enough of a clue.
The argument for as is a SEXP :
template T as( SEXP m_sexp)
and NumericVector::operator[](int) gives you a reference to a double
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enth
Matrix)
i <- c(1,3:8); j <- c(2,9,6:10); x <- 7 * (1:7)
( A <- sparseMatrix(i, j, x = x) )
convert(A)
***/
I don't think there is a better way to fill multiple values ina SpMat,
maybe Conrad has insights.
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6
r.h?view=markup&root=rcpp
and the implementation:
https://r-forge.r-project.org/scm/viewvc.php/pkg/Rcpp/src/Timer.cpp?view=markup&root=rcpp
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
blog:h
/Sparse_matrix#Compressed_sparse_column_.28CSC_or_CCS.29
This layout is used by a majority of external solvers.
It would be far more efficient to take this layout into account when
copying matrices, instead of blindly (and slowly) copying element by
element.
On Sunday, December 9, 2012, Romain Francois
Ah. One thing I could do is leverage this:
#ifdef ARMA_EXTRA_SPMAT_PROTO
#include ARMA_INCFILE_WRAP(ARMA_EXTRA_SPMAT_PROTO)
#endif
Not sure how yet.
Le 08/12/12 19:17, Romain Francois a écrit :
That looks very similar, if not identical to what dgCMatrix uses. Can
you direct me to a
oable.
Romain
On Sunday, December 9, 2012, Romain Francois
mailto:rom...@r-enthusiasts.com>> wrote:
> Le 08/12/12 09:45, Søren Højsgaard a écrit :
>>
>> Dear all,
>>
>> I want to use a matrix (of type "dgCMatrix" from th
, Dec 9, 2012 at 5:55 AM, Romain Francois
wrote:
Yes. Conrad left a back door open so that we can add things **inside** the
SpMat template, similar to what we have done in dense matrix classes.
Going from there I was looking at the copy constructor of a SpMat, which
eventually is a call to init:
/
//will not work
return List::create(Named("X") = wrap(X),
Named("of1") = outf1,
Named("of2") = outf2);
}
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http:/
Le 10/12/12 17:06, Romain Francois a écrit :
the .col method gives you a subview_col :
arma_inline subview_col col(const uword col_num);
arma_inline const subview_col col(const uword col_num) const;
not an umat.
The name of the class implies that it is a "view" class, s
Le 10/12/12 17:45, Douglas Bates a écrit :
On Mon, Dec 10, 2012 at 10:38 AM, Romain Francois
mailto:rom...@r-enthusiasts.com>> wrote:
Le 10/12/12 17:29, Douglas Bates a écrit :
or does it matter?
A[i,j] is wrong, not valid C or C++ code. so there is only one choice.
r entries of a row of the CharacterMatrix X into a single string
that will then comprise an element of the returned CharacterVector Y?
Many thanks,
Pete
Peter Hickey,
PhD Student/Research Assistant,
Bioinformatics Division,
Walter and Eliza Hall Institute of Medica
ent of the returned CharacterVector Y?
Many thanks,
Pete
Peter Hickey,
PhD Student/Research Assistant,
Bioinformatics Division,
Walter and Eliza Hall Institute of Medical Research,
1G Royal Parade, Parkville, Vic 3052, Australia.
Ph: +613 9345 2324
hic...@wehi
;u" "v" "w" "x" "y" "z" "a" "b" "c" "d" "e" "f" "g" "h" "i" "j"
"k" "l"
[39] "m" "n" "o" &q
Dr. Glenn Lawyer
+352 661 967 244
Max-Planck-Institut für Informatik
Computational Biology and Applied Algorithmics
Campus E1 4
66123 Saarbrücken, Germany
http://bioinf.mpi-inf.mpg.de/~lawyer
___
Rcpp-devel maili
Le 13/12/12 17:29, Dirk Eddelbuettel a écrit :
On 13 December 2012 at 10:01, Romain Francois wrote:
| Hello,
|
| I'd like to add a functionality to "bind" vectors of the same type (well
| sugar expressions really, but let's say it is vectors for the sake of
| this email).
|
an State University
1579 I Spartan Village, East Lansing, MI 48823
wangh...@msu.edu <mailto:wangh...@msu.edu> [1]
Links:
--
[1] mailto:wangh...@msu.edu <mailto:wangh...@msu.edu>
--
Romain Francois
Professional R Enthusiast
+33(0) 6
List::create(Named("betahat") = betahat00);
>
> Best wishes!
>
> Honglang Wang
>
> Office C402 Wells Hall
> Department of Statistics and Probability
> Michigan State University
> 1579 I Spartan Village, East Lansing, MI 48823
> wangh...@msu.edu
>
>
&
I would create a class that contains a pointer to the c struct.
This obviously leaves the problem of freeing the memory, i.e does the c++
object own the pointer.
Maybe a strategy using some reference counting smart pointer.
In RcppEigen we have not resolved this, we simply exposed a free met
Thanks for the notice, will fix when i get a chance if nobody else does it
first.
I simplified this file yesterday to trim some old unused code, so i'll take the
blame...
The fix should just be to add
#include
On top of the file somewhere.
Romain
Le 16 déc. 2012 à 17:53, Thell Fowler
Sure. Something like that, typeinfo is pretty orthogonal to features of the
other includes, so no issue of header order.
While you're there, does R CMD check Rcpp work fine ?
Romain
Le 16 déc. 2012 à 18:04, Thell Fowler a écrit :
> diff --git a/pkg/Rcpp/src/exceptions.cpp b/pkg/Rcpp/src/ex
pp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
blog:http://romainfrancois.b
uidance would be really appreciated!
many thanks,
jean
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
::sugar::All::All(const Rcpp::VectorBase<10,
false, LHS_T>&)’:
/usr/lib/R/library/Rcpp/include/Rcpp/sugar/functions/all.h:64: error:
expected ‘(’ before ‘,’ token
On Thursday, December 20, 2012 at 12:48 AM, "Romain Francois"
wrote:
The extern "C" looks
100
Rcpp.var = cxxfunction(signature(input="numeric"), plugin="Rcpp",
body="
NumericVector v = input;
int n = v.size();
double v_mean = get_sum(v,n)/n;
double v_var = get_var(v,v_mean,n);
return wrap(v_var);
Are you linking against the gretl library ?
Le 21 déc. 2012 à 12:12, jea...@hushmail.com a écrit :
> hi,
>
> a quick question regarding a Rcpp function I wrote using an external library
> (gretl) :
>
> with the help of a makefile (adapted from the convolution Rcpp example), the
> code compi
0
Maybe there is something we can do at our end to improve this by making
a more efficient iterator over a matrix row.
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
blog:http://romainfrancois.bl
.
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-en
y
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6 6
7 7 7
8 8 8
9 9 9
10 10 10
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
blog:http://romainfrancois.blog.free.fr
|- http://bit.ly/RE6sYH :
just a few things that I found odd while
looking at your code. (It took me more time to write this email than
finding these odd :-) ).
Romain
I will try to make it by adapting the two functions and their use !
Robin
- Mail original -
De: "Romain Francois"
À: rcpp-devel
n sourceCpp("testBoost.cpp") :
Error 1 occurred building shared library.
Regards,
André
Hello,
You should have a look at the BH package, with which all you have to do
(I think) is to have this in your DESCRIPTION:
LinkingTo: BH, Rcpp
And you're good to go.
Romain
--
Romain
Thanks. I will fix it.
Romain
Le 8 févr. 2013 à 05:28, Davor Cubranic a écrit :
> On 13-02-07 07:24 PM, Davor Cubranic wrote:
>> The version assigning an element of a const CharacterVector to a const
>> std::string (named "bar" below) compiles and works fine in Rcpp 0.9.14,
>> so the problem w
Thank you for this detailed email, i will study it carefully.
Romain
Le 8 févr. 2013 à 13:16, Yan Zhou a écrit :
> This morning I was frustrated by a compilation error, below is a scratch of
> the problem
>
> // MyClass1.h
> template
> class MyClass {/*...*/};
>
> #include
> namespace R
Right. I see what you mean. If it does bot disturbe anything else, i should be
able to bring it back.
Romain
Le 10 févr. 2013 à 04:54, Davor Cubranic a écrit :
> On 13-02-09 05:06 AM, Dirk Eddelbuettel wrote:
>>
>> On 8 February 2013 at 20:58, Davor Cubranic wrote:
>>> That fixed just the
1 - 100 of 793 matches
Mail list logo