Re: [Rcpp-devel] [OT] Rcpp CRAN usage milestone

2012-04-12 Thread Steve Lianoglou
Indeed -- big thanks to the Rcpp devs.
Rcpp is definitely an indispensable tool in the tool-belt.

Thanks, folks!

-steve

On Thu, Apr 12, 2012 at 10:44 PM, baptiste auguie
 wrote:
> A big thanks from me too, to the Rcpp team for a great piece of software.
> (there was a summery Easter break, during which I did not keep up with
> list emails -- thanks for reviving it)
>
> Cheers,
>
> baptiste
>
>
>
> On 13 April 2012 14:33, Michael Hannon  wrote:
>> On Sunday, April 8, 2012 at 10:50 AM Dirk Eddelbuettel wrote:
>>
>>> The CRANberries service [1] just noticed a new package 'survSNP' which
>>> brings the number of CRAN packages having a Depends: or Imports: on Rcpp to
>>> sixty.
>> .
>> .
>> .
>>> So I it is really nice to see that Rcpp appears to now be playing
>>> approximately the same role for many of you reading this list here---so a
>>> big "Thank You!" to all of you for your patches, bug reports, questions and
>>> or suggestions.
>> .
>> .
>> .
>>
>> Hi, Dirk.  I guess it takes a village to raise a successful R package, so in
>> that sense your "Thank You!" to the users of Rcpp & Friends is appropriate.
>>
>> But I like to think that for both kids and R packages the "parents" play an
>> essential role.  I've been waiting for somebody to offer the obvious "back at
>> you, dude!" response, but I haven't seen one.  So let me be the first: thanks
>> to you and Romain for creating, maintaining, and updating Rcpp.
>>
>> -- Mike
>> ___
>> 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
> ___
> 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



-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
___
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


Re: [Rcpp-devel] [OT] Rcpp CRAN usage milestone

2012-04-12 Thread baptiste auguie
A big thanks from me too, to the Rcpp team for a great piece of software.
(there was a summery Easter break, during which I did not keep up with
list emails -- thanks for reviving it)

Cheers,

baptiste



On 13 April 2012 14:33, Michael Hannon  wrote:
> On Sunday, April 8, 2012 at 10:50 AM Dirk Eddelbuettel wrote:
>
>> The CRANberries service [1] just noticed a new package 'survSNP' which
>> brings the number of CRAN packages having a Depends: or Imports: on Rcpp to
>> sixty.
> .
> .
> .
>> So I it is really nice to see that Rcpp appears to now be playing
>> approximately the same role for many of you reading this list here---so a
>> big "Thank You!" to all of you for your patches, bug reports, questions and
>> or suggestions.
> .
> .
> .
>
> Hi, Dirk.  I guess it takes a village to raise a successful R package, so in
> that sense your "Thank You!" to the users of Rcpp & Friends is appropriate.
>
> But I like to think that for both kids and R packages the "parents" play an
> essential role.  I've been waiting for somebody to offer the obvious "back at
> you, dude!" response, but I haven't seen one.  So let me be the first: thanks
> to you and Romain for creating, maintaining, and updating Rcpp.
>
> -- Mike
> ___
> 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
___
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


Re: [Rcpp-devel] [OT] Rcpp CRAN usage milestone

2012-04-12 Thread Michael Hannon
On Sunday, April 8, 2012 at 10:50 AM Dirk Eddelbuettel wrote:

> The CRANberries service [1] just noticed a new package 'survSNP' which
> brings the number of CRAN packages having a Depends: or Imports: on Rcpp to
> sixty.
.
.
.
> So I it is really nice to see that Rcpp appears to now be playing
> approximately the same role for many of you reading this list here---so a
> big "Thank You!" to all of you for your patches, bug reports, questions and
> or suggestions. 
.
.
.

Hi, Dirk.  I guess it takes a village to raise a successful R package, so in
that sense your "Thank You!" to the users of Rcpp & Friends is appropriate.

But I like to think that for both kids and R packages the "parents" play an
essential role.  I've been waiting for somebody to offer the obvious "back at
you, dude!" response, but I haven't seen one.  So let me be the first: thanks
to you and Romain for creating, maintaining, and updating Rcpp.

-- Mike
___
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


Re: [Rcpp-devel] Cannot find header file R.h in Rcpp c++ package

2012-04-12 Thread Dirk Eddelbuettel

Hi again,

On 12 April 2012 at 17:06, Mingyu Tang wrote:
| Hi Dirk,
| 
| Thanks for your reply.
| I am new hand on this and got a little confused.
| So instead of using 'g++' , I should use 'R CMD SHLIB' to compile my c++ 
code, right?

That makes some things easier, yes.
 
| Could you complete the command in the command line? For example, let's say, 
my c++ file is 'example.cpp'. Shall I input  'R CMD SHLIB example.cpp' ? which 
flag shall I use to indicate where the Rcpp package is?
| 
| Thank you very much.

PLease read the Rcpp-FAQ, along with the 'Writing R Extensions' manual.  If
you're really lost try some slidedecks from some of my presentations.

We really try to provide ample documentation at all levels.

Dirk

| 
| Mingyu
| 
| On Apr 12, 2012, at 11:50 AM, Dirk Eddelbuettel wrote:
| 
| > 
| > Hi,
| > 
| > Thanks for posting here.
| > 
| > On 12 April 2012 at 11:40, Mingyu Tang wrote:
| > | Hi,
| > | 
| > | I am trying to use the Rcpp and RInside package in C++ on my Macbook. 
| > | When I compile the examples given on the website, the compiler returns 
that
| > | "R.h: No such file or directory". And also a lot of other header files 
cannot
| > | be found. And I searched in the package manually, and I did not find this 
R.h
| > | file as well. Can anyone tell me what's going wrong here?
| > | 
| > | I downloaded Rcpp_0.9.10.tar package from CRAN. 
| > | I used the following command to compile:
| > | g++ -I /Users/alectang/Downloads/Rcpp/include example.cpp -o example
| > 
| > Rcpp is an R extension package.  R packages have a very specific way of 
being
| > built which is explained in detail in the 'Writing R Extensions' manual that
| > comes with R.  In short, you want 'R CMD SHLIB ...' or 'R CMD COMPILE ...'
| > most of the time.
| > 
| > If you do want to do it by hand using g++, you have to add -I flags for R as
| > well as Rcpp does not exist outside of R. 
| > 
| > See the Rcpp-FAQ vignette for more details.
| > 
| > Dirk
| > 
| > | 
| > | Thank you in advance.
| > | 
| > | regards,
| > | 
| > | --
| > | --
| > | Mingyu Tang
| > | PhD candidate,
| > | Department of Statistics,
| > | Carnegie Mellon University
| > | Pittsburgh, PA 15213
| > | 
| > | 
| > | --
| > | ___
| > | 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
| > -- 
| > R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
| > See agenda, registration details and more at http://www.RinFinance.com
| 

-- 
R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
See agenda, registration details and more at http://www.RinFinance.com
___
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


Re: [Rcpp-devel] Cannot find header file R.h in Rcpp c++ package

2012-04-12 Thread Mingyu Tang
Hi Dirk,

Thanks for your reply.
I am new hand on this and got a little confused.
So instead of using 'g++' , I should use 'R CMD SHLIB' to compile my c++ code, 
right?

Could you complete the command in the command line? For example, let's say, my 
c++ file is 'example.cpp'. Shall I input  'R CMD SHLIB example.cpp' ? which 
flag shall I use to indicate where the Rcpp package is?

Thank you very much.

Mingyu

On Apr 12, 2012, at 11:50 AM, Dirk Eddelbuettel wrote:

> 
> Hi,
> 
> Thanks for posting here.
> 
> On 12 April 2012 at 11:40, Mingyu Tang wrote:
> | Hi,
> | 
> | I am trying to use the Rcpp and RInside package in C++ on my Macbook. 
> | When I compile the examples given on the website, the compiler returns that
> | "R.h: No such file or directory". And also a lot of other header files 
> cannot
> | be found. And I searched in the package manually, and I did not find this 
> R.h
> | file as well. Can anyone tell me what's going wrong here?
> | 
> | I downloaded Rcpp_0.9.10.tar package from CRAN. 
> | I used the following command to compile:
> | g++ -I /Users/alectang/Downloads/Rcpp/include example.cpp -o example
> 
> Rcpp is an R extension package.  R packages have a very specific way of being
> built which is explained in detail in the 'Writing R Extensions' manual that
> comes with R.  In short, you want 'R CMD SHLIB ...' or 'R CMD COMPILE ...'
> most of the time.
> 
> If you do want to do it by hand using g++, you have to add -I flags for R as
> well as Rcpp does not exist outside of R. 
> 
> See the Rcpp-FAQ vignette for more details.
> 
> Dirk
> 
> | 
> | Thank you in advance.
> | 
> | regards,
> | 
> | --
> | --
> | Mingyu Tang
> | PhD candidate,
> | Department of Statistics,
> | Carnegie Mellon University
> | Pittsburgh, PA 15213
> | 
> | 
> | --
> | ___
> | 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
> -- 
> R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
> See agenda, registration details and more at http://www.RinFinance.com

___
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


[Rcpp-devel] Rcpp plugin use adding -I for current directory

2012-04-12 Thread Dirk Eddelbuettel

Someone recently asked (and I can't find it here so it may have been on
StackOverflow) how to tell inline to also consider the current working
directory for includes.

I answered that one can't as inline / cxxfunction always switches to a
temporary directory created by R.  Turns out that one can in fact, as it is
the known current working directory.  Romain had added this in one of our
examples:

settings <- getPlugin("Rcpp")
settings$env$PKG_CXXFLAGS <- paste("-I", getwd(), sep="")

and then uses   settings=settings   in the call to cxxfunction.  

Nice trick.

Regards,  Dirk

-- 
R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
See agenda, registration details and more at http://www.RinFinance.com
___
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


Re: [Rcpp-devel] using Rinside/Rcpp and Eigen

2012-04-12 Thread Dirk Eddelbuettel

Hi,

Thanks for posting here.

On 12 April 2012 at 07:31, Cattus Cerebrum wrote:
| I have a c++ project that stores data in Eigen matrices.
| I would like to use R functionality from the c++ code,
| but I am not sure how to convert my data to Rcpp data types
| (e.g. NumericVector).  Should I create a NumericVector
| and copy my data into it, or is there any way to avoid the
| copy by using the common storage?  Eigen matrix has a method
| data() that returns the underlying double pointer, and
| methods that give outer and inner strides of the matrix.

Take a look at the RcppEigen package and its code.

Dirk

-- 
R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
See agenda, registration details and more at http://www.RinFinance.com
___
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


Re: [Rcpp-devel] Cannot find header file R.h in Rcpp c++ package

2012-04-12 Thread Dirk Eddelbuettel

Hi,

Thanks for posting here.

On 12 April 2012 at 11:40, Mingyu Tang wrote:
| Hi,
| 
| I am trying to use the Rcpp and RInside package in C++ on my Macbook. 
| When I compile the examples given on the website, the compiler returns that
| "R.h: No such file or directory". And also a lot of other header files cannot
| be found. And I searched in the package manually, and I did not find this R.h
| file as well. Can anyone tell me what's going wrong here?
| 
| I downloaded Rcpp_0.9.10.tar package from CRAN. 
| I used the following command to compile:
| g++ -I /Users/alectang/Downloads/Rcpp/include example.cpp -o example

Rcpp is an R extension package.  R packages have a very specific way of being
built which is explained in detail in the 'Writing R Extensions' manual that
comes with R.  In short, you want 'R CMD SHLIB ...' or 'R CMD COMPILE ...'
most of the time.

If you do want to do it by hand using g++, you have to add -I flags for R as
well as Rcpp does not exist outside of R. 

See the Rcpp-FAQ vignette for more details.

Dirk

| 
| Thank you in advance.
| 
| regards,
| 
| --
| --
| Mingyu Tang
| PhD candidate,
| Department of Statistics,
| Carnegie Mellon University
| Pittsburgh, PA 15213
| 
| 
| --
| ___
| 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
-- 
R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
See agenda, registration details and more at http://www.RinFinance.com
___
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


[Rcpp-devel] Cannot find header file R.h in Rcpp c++ package

2012-04-12 Thread Mingyu Tang
Hi,

I am trying to use the Rcpp and RInside package in C++ on my Macbook.
When I compile the examples given on the website, the compiler returns that
"R.h: No such file or directory". And also a lot of other header files
cannot be found. And I searched in the package manually, and I did not find
this R.h file as well. Can anyone tell me what's going wrong here?

I downloaded Rcpp_0.9.10.tar package from CRAN.
I used the following command to compile:
g++ -I /Users/alectang/Downloads/Rcpp/include example.cpp -o example

Thank you in advance.

regards,

-- 
--
Mingyu Tang
PhD candidate,
Department of Statistics,
Carnegie Mellon University
Pittsburgh, PA 15213
___
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

[Rcpp-devel] using Rinside/Rcpp and Eigen

2012-04-12 Thread Cattus Cerebrum
I have a c++ project that stores data in Eigen matrices.
I would like to use R functionality from the c++ code,
but I am not sure how to convert my data to Rcpp data types
(e.g. NumericVector).  Should I create a NumericVector
and copy my data into it, or is there any way to avoid the
copy by using the common storage?  Eigen matrix has a method
data() that returns the underlying double pointer, and
methods that give outer and inner strides of the matrix.
Thanks.
___
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