Re: [Rcpp-devel] Package does not compile on MAC when running R-CMD-check github action

2021-11-14 Thread Simon Zehnder
me comments that helped me to find out what the problem was. Best, Simon Am Mo., 8. Nov. 2021 um 11:36 Uhr schrieb Simon Zehnder < simon.zehn...@googlemail.com>: > Hi Simon, > > thank you for bringing this up. As mentioned in the answer to Dirk, I am > at this point not anymor

Re: [Rcpp-devel] Package does not compile on MAC when running R-CMD-check github action

2021-11-08 Thread Simon Zehnder
Hi Simon, thank you for bringing this up. As mentioned in the answer to Dirk, I am at this point not anymore that fluent in C++ as I was some years ago. I am looking through the classes and I am not yet sure what to look for. What I see is an error message: ./PriorStudentInd.h:31:14: warning:

Re: [Rcpp-devel] Package does not compile on MAC when running R-CMD-check github action

2021-11-08 Thread Simon Zehnder
Dirk, thank you for your response. That eliminates already a source. I am honestly not anymore that fluent in C++ than I was some years ago. Best, Simon Am So., 7. Nov. 2021 um 16:56 Uhr schrieb Dirk Eddelbuettel : > > Simon, > > Your Makevars [1] is very standard so I would suspect it may be

[Rcpp-devel] Package does not compile on MAC when running R-CMD-check github action

2021-11-07 Thread Simon Zehnder
Hi everyone, I have a problem with the compilation of a package on MacOS when running the R-CDM-check github action. On all other platforms the package compiles, but on MacOS. I get a problem with the shared library on MacOS: OE> Error: package or namespace load failed for ‘finmix’ in

Re: [Rcpp-devel] Using Rcpp with results in "shared object 'nloptC.so' not found"

2021-08-18 Thread Simon Zehnder
towards the solution. Best Simon Am Mi., 18. Aug. 2021 um 17:18 Uhr schrieb Dirk Eddelbuettel : > > On 18 August 2021 at 16:36, Simon Zehnder wrote: > | I am using R 4.0.5 on a Fedora 34 System, Rcpp 1.0.6 and nloptr 1.2.2.2. > > Works here (Ubuntu 21.04, Rcpp 1.0.7) (see [1] below) &g

Re: [Rcpp-devel] Using Rcpp with results in "shared object 'nloptC.so' not found"

2021-08-18 Thread Simon Zehnder
Iñaki Ucar < iu...@fedoraproject.org>: > On Wed, 18 Aug 2021 at 16:37, Simon Zehnder > wrote: > > > > Hi folks, > > > > apologies, if I am double posting - I had problems with my mail. > > > > I need some help here from experienced Rcpp developers. >

[Rcpp-devel] Using Rcpp with results in "shared object 'nloptC.so' not found"

2021-08-18 Thread Simon Zehnder
Hi folks, apologies, if I am double posting - I had problems with my mail. I need some help here from experienced Rcpp developers. I am coding since some time on an R-package using Rcpp and nlopt. Lately I found out that I could probably use 'nloptr' to include nlopt in my C++ code, which would

Re: [Rcpp-devel] Shared library error after update

2014-03-04 Thread Simon Zehnder
regression is -- that will take some more investigation. Try changing that around and let me know if things work. Cheers, Kevin On Mon, Mar 3, 2014 at 10:59 AM, Simon Zehnder szehn...@uni-bonn.de wrote: Hi Kevin, the github repo is a good idea, though I have some dependencies

Re: [Rcpp-devel] Shared library error after update

2014-03-04 Thread Simon Zehnder
passing Rcpp objects by value, since you are essentially just copying pointers. As for what the actual regression is -- that will take some more investigation. Try changing that around and let me know if things work. Cheers, Kevin On Mon, Mar 3, 2014 at 10:59 AM, Simon Zehnder szehn

Re: [Rcpp-devel] round function not found?

2014-03-04 Thread Simon Zehnder
Hideyoshi, following http://dirk.eddelbuettel.com/blog/2012/10/01/, this should work though. Also using the inline package I get the correct result: src - 'return Rcpp::wrap(round(3.2));’ cfunc - cxxfunction(body = src, plugin = Rcpp”) cfunc() [1] 3 Best Simon On 04 Mar 2014, at 12:30,

Re: [Rcpp-devel] round function not found?

2014-03-04 Thread Simon Zehnder
In some way, round does not work on a matrix. But you can use RcppArmadillo: src - 'Rcpp::NumericMatrix M(m); arma::mat armaM(M.begin(), M.nrow(), M.ncol(), true, true); return Rcpp::wrap(arma::floor(armaM));’ cfunc - cxxfunction(signature(m = matrix), body = src, plugin = RcppArmadillo”) m -

[Rcpp-devel] Shared library error after update

2014-03-03 Thread Simon Zehnder
Dear Rcpp::Users and Rcpp::Devels, I updated to the newest versions of Rcpp and RcppArmadillo. Now I get an error with the shared library when compiling my package: Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object

Re: [Rcpp-devel] Shared library error after update

2014-03-03 Thread Simon Zehnder
a Makevars file in the src folder). Does that mean I delete the line PKG_LIBS = ‘$(R_HOME)/bin/Rscript -e “Rcpp:::LdFlags()”’ from my Makevars file? Is it obligatory? Best Simon On 03 Mar 2014, at 14:19, Dirk Eddelbuettel e...@debian.org wrote: On 3 March 2014 at 14:02, Simon Zehnder

Re: [Rcpp-devel] Shared library error after update

2014-03-03 Thread Simon Zehnder
Ushey kevinus...@gmail.com wrote: Do you have a GitHub repository or some other means of sharing your package, so we can try testing it? On Mon, Mar 3, 2014 at 6:12 AM, Dirk Eddelbuettel e...@debian.org wrote: On 3 March 2014 at 14:38, Simon Zehnder wrote: | Though I couldn't detect NEWS

Re: [Rcpp-devel] Package built with Rcpp fails to install

2014-02-03 Thread Simon Zehnder
Hi all, compiled the package from github on a Linux Scientific Machine: install_github(dendextendRcpp, user = talgalili) Installing github repo(s) dendextendRcpp/master from talgalili Downloading dendextendRcpp.zip from https://github.com/talgalili/dendextendRcpp/archive/master.zip Installing

Re: [Rcpp-devel] Package built with Rcpp fails to install

2014-02-03 Thread Simon Zehnder
I get the error on the Scientific Linux Machine when using Rcpp 0.11.0: Installing github repo(s) dendextendRcpp/master from talgalili Downloading dendextendRcpp.zip from https://github.com/talgalili/dendextendRcpp/archive/master.zip Installing package from

Re: [Rcpp-devel] Package built with Rcpp fails to install

2014-02-03 Thread Simon Zehnder
Dirk, I saw this message shortly after I sent my second one … Simon On 03 Feb 2014, at 21:33, Dirk Eddelbuettel e...@debian.org wrote: On 3 February 2014 at 21:24, Simon Zehnder wrote: | Hi all, | | compiled the package from github on a Linux Scientific Machine: I just did too, under

Re: [Rcpp-devel] Package built with Rcpp fails to install

2014-02-03 Thread Simon Zehnder
me: tal.gal...@gmail.com | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Mon, Feb 3, 2014 at 10:44 PM, Simon Zehnder szehn...@uni

Re: [Rcpp-devel] How much speedup for matrix operations?

2013-11-06 Thread Simon Zehnder
AFAIR there was a similar discussion here: http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2012-June/003888.html Best Simon On 06 Nov 2013, at 18:35, Xavier Robin xav...@cbs.dtu.dk wrote: Hi, I have a pure-R code that spends most of the time performing vector and matrix

Re: [Rcpp-devel] How much speedup for matrix operations?

2013-11-06 Thread Simon Zehnder
As Romain already mentioned, there could be rather a memory issue - copying is one issue. Very often time gets lost in loads and writes with cache misses. How large are your matrices? Have you done a memory-profiling? Best Simon On 06 Nov 2013, at 19:04, Xavier Robin xav...@cbs.dtu.dk wrote:

Re: [Rcpp-devel] Attribute does not compile with 'compileAttributes' but with 'sourceCpp'

2013-11-02 Thread Simon Zehnder
Francois rom...@r-enthusiasts.com wrote: Le 02/11/2013 09:35, Simon Zehnder a écrit : First, I didn’t. But for getting some output from the functions in attributes.cpp I later compiled the Rcpp package from source. When I compile with the option “-headerpad_max_install_names

Re: [Rcpp-devel] Attribute does not compile with 'compileAttributes' but with 'sourceCpp'

2013-11-02 Thread Simon Zehnder
nov. 2013 à 10:25, Simon Zehnder szehn...@uni-bonn.de a écrit : Thanks Romain, looks the same here. So the path is the same, but it seems, that the padding is different. I would like to understand what happens when I call compileAttributes. Is there anywhere a linking involved with Rcpp.so

[Rcpp-devel] Attribute does not compile with 'compileAttributes' but with 'sourceCpp'

2013-11-01 Thread Simon Zehnder
Dear Rcpp::Users and Rcpp::Devels, I get a weird exception when I try to compile an attribute in one of my packages: compileAttributes(/Users/simonzehnder/git/mmstruct/mmstruct/) R(6256,0x7fff79ad9310) malloc: *** error for object 0x7fff7ac48330: pointer being freed was not allocated *** set a

Re: [Rcpp-devel] Attribute does not compile with 'compileAttributes' but with 'sourceCpp'

2013-11-01 Thread Simon Zehnder
) within the same compilation (there is exposure to this with the changes made by Apple to the toolchain in Mavericks). J.J. On Fri, Nov 1, 2013 at 10:01 AM, Simon Zehnder szehn...@uni-bonn.de wrote: Dear Rcpp::Users and Rcpp::Devels, I get a weird exception when I try to compile

Re: [Rcpp-devel] Attribute does not compile with 'compileAttributes' but with 'sourceCpp'

2013-11-01 Thread Simon Zehnder
the Mavericks update, using: rm -rf /usr/local/Cellar brew prune brew doctor brew install what-you-need On Fri, Nov 1, 2013 at 11:19 AM, Simon Zehnder szehn...@uni-bonn.de wrote: Point landing J.J.! I already compiled a new R when Mavericks came out with a newly installed a gcc-4.8.2, that I can

Re: [Rcpp-devel] Attribute does not compile with 'compileAttributes' but with 'sourceCpp'

2013-11-01 Thread Simon Zehnder
* did not install files from brew * On 01 Nov 2013, at 17:12, Simon Zehnder szehn...@uni-bonn.de wrote: Hi Dominick, I did install files from brew but instead used the gcc from http://hpc.sourceforge.net On 01 Nov 2013, at 16:55, Dominick Samperi djsamp...@gmail.com wrote: If you

Re: [Rcpp-devel] Attribute does not compile with 'compileAttributes' but with 'sourceCpp'

2013-11-01 Thread Simon Zehnder
sourceCpp and compileAttributes. J.J. On Fri, Nov 1, 2013 at 11:19 AM, Simon Zehnder szehn...@uni-bonn.de wrote: Point landing J.J.! I already compiled a new R when Mavericks came out with a newly installed a gcc-4.8.2, that I can load via environment modules. I also installed

Re: [Rcpp-devel] Attribute does not compile with 'compileAttributes' but with 'sourceCpp'

2013-11-01 Thread Simon Zehnder
Windows... On Fri, Nov 1, 2013 at 12:12 PM, Simon Zehnder szehn...@uni-bonn.de wrote: Hi Dominick, I did install files from brew but instead used the gcc from http://hpc.sourceforge.net On 01 Nov 2013, at 16:55, Dominick Samperi djsamp...@gmail.com wrote: If you depend on tools

Re: [Rcpp-devel] Attribute does not compile with 'compileAttributes' but with 'sourceCpp'

2013-11-01 Thread Simon Zehnder
package shared library. The fix was to make sure all apps and libs are updated after moving to Mavericks. See the thread in rcppoctave-users list for a blow-by-blow description. On Fri, Nov 1, 2013 at 1:11 PM, Simon Zehnder szehn...@uni-bonn.de wrote: You are right, working with apple and C

Re: [Rcpp-devel] Attribute does not compile with 'compileAttributes' but with 'sourceCpp'

2013-11-01 Thread Simon Zehnder
gettext guess is nonsense… On 01 Nov 2013, at 20:02, Simon Zehnder szehn...@uni-bonn.de wrote: I read through all the thread answers and my variables in the Makeconf are the same alsso I installed the Xcode Command Line Tools for Mavericks. Are there any other apps and libs that have been

Re: [Rcpp-devel] Attribute does not compile with 'compileAttributes' but with 'sourceCpp'

2013-11-01 Thread Simon Zehnder
, Simon Zehnder szehn...@uni-bonn.de wrote: I read through all the thread answers and my variables in the Makeconf are the same alsso I installed the Xcode Command Line Tools for Mavericks. Are there any other apps and libs that have been to be updated? (I do not use brew). What remains

Re: [Rcpp-devel] inline error

2013-10-28 Thread Simon Zehnder
...@lists.r-forge.r-project.org rcpp-devel-boun...@lists.r-forge.r-project.org on behalf of Simon Zehnder szehn...@uni-bonn.de Sent: 28 October 2013 13:58 To: rcpp-devel@lists.r-forge.r-project.org Subject: [Rcpp-devel] inline error Dear Rcpp::Users and Rcpp::Devels, I get a weird error when

Re: [Rcpp-devel] Problems getting RInside to work on OS X

2013-10-27 Thread Simon Zehnder
Yepp, had a similar problem when using my gcc-4.8.1 (clang does not yet provide the openmp library by default - coming soon with Intel’s openmp implementation). It could not find the headers cdefs.h, types.h, etc. The $CFLAGS variable of my GCC-4.8.1 was defined but was not considered by R CMD

Re: [Rcpp-devel] Problems getting RInside to work on OS X

2013-10-27 Thread Simon Zehnder
now produce the ~/.R/Makevars file during module load. That makes everything more comfortable than adding a CFLAGS to the R CMD INSTALL command. Best SImon On 27 Oct 2013, at 15:08, Dirk Eddelbuettel e...@debian.org wrote: On 27 October 2013 at 10:49, Simon Zehnder wrote: | I wonder though

Re: [Rcpp-devel] OT: Boost NT

2013-10-15 Thread Simon Zehnder
Darren, this library looks interesting! Thank you for the link! The user-friendly provision of tools to make development of high-performance code more easy seems to be a new trend: Lately Dirk mentioned yeppp! to me (I am always interested in such things), OpenMP 4.0 goes in the same

Re: [Rcpp-devel] plugin in a package - how is it registered?

2013-10-15 Thread Simon Zehnder
:55, Simon Zehnder wrote: | Does anyone have an explanation what is going on and if I might have forgotten something in my code? AFAIK this has nothing to do with Rcpp. When you do foo - readLines(someFile.txt) you now get the warning, whereas in the past you did not. It seems

Re: [Rcpp-devel] plugin in a package - how is it registered?

2013-10-14 Thread Simon Zehnder
= file20c62a48c701.cpp.err.txt and no warning occurs. Does anyone have an explanation what is going on and if I might have forgotten something in my code? Best Simon On Oct 12, 2013, at 9:55 AM, Simon Zehnder szehn...@uni-bonn.de wrote: Hi J.J., that makes it precise! As I see now also

Re: [Rcpp-devel] plugin in a package - how is it registered?

2013-10-12 Thread Simon Zehnder
On Oct 11, 2013, at 11:54 PM, Dirk Eddelbuettel e...@debian.org wrote: Simon, On 11 October 2013 at 23:43, Simon Zehnder wrote: | I have a very short question in regard to plugins in packages. I have written my own plugin using Rcpp.plugin.maker (very well documented in FAQ btw

Re: [Rcpp-devel] plugin in a package - how is it registered?

2013-10-12 Thread Simon Zehnder
Eddelbuettel e...@debian.org wrote: Simon, On 11 October 2013 at 23:43, Simon Zehnder wrote: | I have a very short question in regard to plugins in packages. I have written my own plugin using Rcpp.plugin.maker (very well documented in FAQ btw). | | I know, that on the command line

[Rcpp-devel] plugin in a package - how is it registered?

2013-10-11 Thread Simon Zehnder
Dear Rcpp::Users and Rcpp::Devels, I have a very short question in regard to plugins in packages. I have written my own plugin using Rcpp.plugin.maker (very well documented in FAQ btw). I know, that on the command line calling registerPlugin() registers the plugin. From RcppArmadillo I can

[Rcpp-devel] Understanding the behaviour of const CharacterVector as a function parameter

2013-09-29 Thread Simon Zehnder
Dear Rcpp::Users and Rcpp::Devels, I would like to understand a certain behaviour of my code I encountered lately. I am working with CharacterVector and the following behaviour occurred: void test1 (Rcpp::CharacterVector charv) { Rprintf(test1: %s\n, (char*) charv(0)); } void test2

Re: [Rcpp-devel] Understanding the behaviour of const CharacterVector as a function parameter

2013-09-29 Thread Simon Zehnder
Romain are the ones discussed lately on the rcpp-devel list regarding the shallow copy I assume. Enjoy your day with your family! Best Simon On Sep 29, 2013, at 2:16 PM, Dirk Eddelbuettel e...@debian.org wrote: On 29 September 2013 at 14:06, Simon Zehnder wrote: | Dear Rcpp::Users

Re: [Rcpp-devel] Understanding the behaviour of const CharacterVector as a function parameter

2013-09-29 Thread Simon Zehnder
On Sep 29, 2013, at 3:24 PM, Romain Francois rom...@r-enthusiasts.com wrote: Le 29/09/13 14:06, Simon Zehnder a écrit : Dear Rcpp::Users and Rcpp::Devels, I would like to understand a certain behaviour of my code I encountered lately. I am working with CharacterVector and the following

Re: [Rcpp-devel] Understanding the behaviour of const CharacterVector as a function parameter

2013-09-29 Thread Simon Zehnder
strict compatibility requirements. I see, that the class 'generic_proxy' has gone. What was its intention in Rcpp? Best Simon Romain Le 29/09/13 15:24, Romain Francois a écrit : Le 29/09/13 14:06, Simon Zehnder a écrit : Dear Rcpp::Users and Rcpp::Devels, I would like to understand

Re: [Rcpp-devel] Understanding the behaviour of const CharacterVector as a function parameter

2013-09-29 Thread Simon Zehnder
...@r-enthusiasts.com wrote: Le 29/09/13 20:36, Simon Zehnder a écrit : Hi Romain, thanks for this fix! On Sep 29, 2013, at 5:26 PM, Romain Francois rom...@r-enthusiasts.com wrote: Hello, What acts as a proxy for const CharacterVector does not do its proxy job. Instead it gives

Re: [Rcpp-devel] Understanding the behaviour of const CharacterVector as a function parameter

2013-09-29 Thread Simon Zehnder
does something very similar … Does it even make sense to think about working with POSIXct in Rcpp or is this task already completed/unnecessary? Best Simon On Sep 29, 2013, at 8:49 PM, Dirk Eddelbuettel e...@debian.org wrote: On 29 September 2013 at 20:20, Simon Zehnder wrote

Re: [Rcpp-devel] Understanding the behaviour of const CharacterVector as a function parameter

2013-09-29 Thread Simon Zehnder
Hi Romain, On Sep 29, 2013, at 8:51 PM, Romain Francois rom...@r-enthusiasts.com wrote: Le 29/09/13 20:36, Simon Zehnder a écrit : Hi Romain, thanks for this fix! On Sep 29, 2013, at 5:26 PM, Romain Francois rom...@r-enthusiasts.com wrote: Hello, What acts as a proxy for const

[Rcpp-devel] Formulas in Markdown of Rcpp-Gallery

2013-09-24 Thread Simon Zehnder
Dear Rcpp::Users and Rcpp::Devels, I need a little help with the markdown in .cpp files for the Rcpp-Gallery: How do I type in inline formulas? For example O(N^3)? I tried $O(N^3)$ and also $$latex O(N^3)$$ but nothing seems to work (I forked the repository and make/make preview works perfect

Re: [Rcpp-devel] Formulas in Markdown of Rcpp-Gallery

2013-09-24 Thread Simon Zehnder
there is a different markdown processor (Maruku) being used by jekyll. So out of the box this doesn't work but a workaround might be possible -- I'll investigate later today and let you know if I find something that works. J.J. On Tue, Sep 24, 2013 at 7:10 AM, Simon Zehnder szehn

Re: [Rcpp-devel] Formulas in Markdown of Rcpp-Gallery

2013-09-24 Thread Simon Zehnder
On Sep 24, 2013, at 2:07 PM, Dirk Eddelbuettel e...@debian.org wrote: On 24 September 2013 at 13:10, Simon Zehnder wrote: | I need a little help with the markdown in .cpp files for the Rcpp-Gallery: | How do I type in inline formulas? For example O(N^3)? I tried $O(N^3)$ and | also $$latex O

Re: [Rcpp-devel] Formulas in Markdown of Rcpp-Gallery

2013-09-24 Thread Simon Zehnder
30 minutes seeing if there was a workaround and haven't found one yet). J.J. On Tue, Sep 24, 2013 at 8:20 AM, Simon Zehnder szehn...@uni-bonn.de wrote: Hi Dirk, good to now. I worked with knitr a lot but never with Ruby/Jekyll, so I deduced prematurely that formulas are possible. As I

Re: [Rcpp-devel] Formulas in Markdown of Rcpp-Gallery

2013-09-24 Thread Simon Zehnder
On Sep 24, 2013, at 3:30 PM, Dirk Eddelbuettel e...@debian.org wrote: On 24 September 2013 at 14:58, Simon Zehnder wrote: | Thanks for giving it a try! Seconded. By the same token, if there are any Ruby/jekyll whizzes in the audience, we'd take enhancements for mathjax and/or plot

Re: [Rcpp-devel] Package checking using R-devel (3.1) and Rcpp

2013-09-24 Thread Simon Zehnder
Hi Rob, when I download the latest version Rclusterpp 0.12.1 I see in the Makevars the typical PKG_LIBS += `$(R_HOME)/bin/Rscript -e Rcpp:::LdFlags()` -fopenmp. In there the function Rcpp:::LdFlags() calls internally RcppLdFlags() (see line 84 in the RcppLdpath.R file). Looking into the R

Re: [Rcpp-devel] [PATCH] Be more liberal in accepting pre-processor defines for 64-bit HAS_LONG_LONG

2013-09-17 Thread Simon Zehnder
Would possibly something like defined(__clang__) defined(__cplusplus) (__cplusplus == 201103L) defined(__clang__) defined(__STDC_VERSION__) (__STDC_VERSION__ == 201112L) do? The values given by g++ and clang++ to __cplusplus in C++11 mode match, as well as the values given by gcc and clang

Re: [Rcpp-devel] Symbol not found when including an external library

2013-09-17 Thread Simon Zehnder
configuration below. Thanks to all for helping me out here. Best Simon On Sep 4, 2013, at 7:30 PM, Dirk Eddelbuettel e...@debian.org wrote: On 4 September 2013 at 18:51, Simon Zehnder wrote: | Dear Rcpp::Users, Rcpp::Devels, | | I am following the ongoing discussion 'How to use external

[Rcpp-devel] Error compiling Rcpp 0.10.4

2013-09-12 Thread Simon Zehnder
Dear Rcpp-Users and Rcpp-Devels, I had to reinstall my system lately and compiled R-3.0.1. I installed several packages and all installations went well. Then I tried to install Rcpp 0.10.4. and I got: R CMD INSTALL Rcpp * installing to library ‘/Users/simonzehnder/Library/R/3.0/library’ *

Re: [Rcpp-devel] Error compiling Rcpp 0.10.4

2013-09-12 Thread Simon Zehnder
://gist.github.com/anonymous/6541684. Thanks again for your quick help! Best Simon On Sep 12, 2013, at 5:54 PM, Simon Zehnder szehn...@uni-bonn.de wrote: Romain, Jonathan, many thanks for the quick response. This is actually very good to know, that the -lintl is not in there usually. What I

Re: [Rcpp-devel] Error compiling Rcpp 0.10.4

2013-09-12 Thread Simon Zehnder
- On Thu, Sep 12, 2013 at 10:28 AM, Simon Zehnder szehn...@uni-bonn.de wrote: Dear Rcpp-Users and Rcpp-Devels, I had to reinstall my system lately and compiled R-3.0.1. I installed several packages and all installations went well. Then I

[Rcpp-devel] Modules and Boost and larger data sets

2013-09-06 Thread Simon Zehnder
Dear Rcpp-Users and Rcpp-Devels, this goes especially to Dirk and Romain, the developers of RcppBDT. I am right now writing on a package for market microstructure data - usually large tick datasets with trade times and security symbols. I read the Rcpp Book about Modules and when starting as

Re: [Rcpp-devel] Modules and Boost and larger data sets

2013-09-06 Thread Simon Zehnder
Hi Dirk, thanks for the quick answer and to the many suggestions and correction you gave! I have now a better idea how to design the package. On Sep 6, 2013, at 2:20 PM, Dirk Eddelbuettel e...@debian.org wrote: On 6 September 2013 at 13:46, Simon Zehnder wrote: | Dear Rcpp-Users and Rcpp

Re: [Rcpp-devel] Symbol not found when including an external library

2013-09-05 Thread Simon Zehnder
: rm -rf *.so rm -rf *.o rm -rf nlopt-${NLOPT_VERSION} On Sep 4, 2013, at 7:30 PM, Dirk Eddelbuettel e...@debian.org wrote: On 4 September 2013 at 18:51, Simon Zehnder wrote: | Dear Rcpp::Users, Rcpp::Devels, | | I am following the ongoing discussion 'How to use external C

Re: [Rcpp-devel] Symbol not found when including an external library

2013-09-05 Thread Simon Zehnder
, at 1:37 PM, Dirk Eddelbuettel e...@debian.org wrote: Simon, On 5 September 2013 at 12:44, Simon Zehnder wrote: | Hi Dirk, | | I was able to reconstruct my System this night and I immediately tried your suggestions: | | ii) Either using an absolute path nor repositioning the linking

Re: [Rcpp-devel] Symbol not found when including an external library

2013-09-05 Thread Simon Zehnder
an error, but not so the standalone build I assume, that R uses another libstdc++ library Best Simon On Sep 5, 2013, at 2:17 PM, Simon Zehnder szehn...@uni-bonn.de wrote: Hi Dirk, An important update to my message: I called install.packages(nloptr) and I get exactly the same

[Rcpp-devel] Symbol not found when including an external library

2013-09-04 Thread Simon Zehnder
Dear Rcpp::Users, Rcpp::Devels, I am following the ongoing discussion 'How to use external C++ libraries in R packages withRcpp' (Makevars are still one of my weaknesses) and I have a related question. I am trying to use the C++ optimization library nlopt

[Rcpp-devel] Non-contiguous submatrix

2013-08-26 Thread Simon Zehnder
Dear Rcpp::Users and Rcpp::Devels, I am right now working on a relabeling algorithm where I have a function taking a permutation matrix of all permutations of the labels. Inside the function the values should be permuted in respect to a row of this matrix. In R I would use the following

Re: [Rcpp-devel] Non-contiguous submatrix

2013-08-26 Thread Simon Zehnder
Hi Romain, thanks for the quick reply! This is an answer I can work with! Best Simon On Aug 26, 2013, at 12:33 PM, Romain Francois rom...@r-enthusiasts.com wrote: Le 26 août 2013 à 12:19, Simon Zehnder szehn...@uni-bonn.de a écrit : Dear Rcpp::Users and Rcpp::Devels, I am right now

Re: [Rcpp-devel] Non-contiguous submatrix

2013-08-26 Thread Simon Zehnder
Thanks Dirk! That looks interesting! I will check which solution performs better in my application! Best Simon On Aug 26, 2013, at 1:24 PM, Dirk Eddelbuettel e...@debian.org wrote: On 26 August 2013 at 12:19, Simon Zehnder wrote: | Dear Rcpp::Users and Rcpp::Devels, | | I am right now

Re: [Rcpp-devel] Error when calling `qchisq()`.

2013-07-05 Thread Simon Zehnder
Hi Xiao, I assume, that you have to use the function with its namespace R::qchisq(). The 'using namespace Rcpp;' command does not include the namespace R in which the function qchisq is defined. Best Simon On Jul 5, 2013, at 6:22 PM, Xiao He praguewaterme...@gmail.com wrote: Hi, I

Re: [Rcpp-devel] Rcpp matrix generation crashes my R session

2013-06-22 Thread Simon Zehnder
Marc, I tried it via an inline function and I got a segfault. it is probably the return value: Rcpp::wrap(weightsNet) instead of solely weightsNet. Best Simon On Jun 22, 2013, at 6:10 PM, Marc Jekel mje...@uni-bonn.de wrote: Dear Rcpp users, I am a beginner, I was inspired by

Re: [Rcpp-devel] Delayed usage of auxiliary memory in RcppArmadillo

2013-06-11 Thread Simon Zehnder
the base class containing additional members? I think there are a lot of pitfalls I do not see yet. Best Simon On 06/11/2013 12:02 AM, rom...@r-enthusiasts.com wrote: Some C++ 101 insights below. Le 2013-06-10 23:07, Simon Zehnder a écrit : Dear Rcpp::Devels and Rcpp::Users, I am temporarily

Re: [Rcpp-devel] Setting R seed from Cpp (continued)

2013-06-10 Thread Simon Zehnder
Simon On Jun 10, 2013, at 9:28 PM, Dirk Eddelbuettel e...@debian.org wrote: Simon, On 10 June 2013 at 20:22, Simon Zehnder wrote: | this is an interesting post. My assumption is, that as in the first approach I fear tou may be a couple of posts late. Please see http

[Rcpp-devel] Delayed usage of auxiliary memory in RcppArmadillo

2013-06-10 Thread Simon Zehnder
Dear Rcpp::Devels and Rcpp::Users, I am temporarily experiencing with a delayed assignment of auxiliary memory in RcppArmadillo: Declare a matrix from which you know you may need it arma::mat maybeM; (In C++ a declaration makes only known the type and name but allocates no storage yet). Now

Re: [Rcpp-devel] Integer matrices in Rcpp and Armadillo

2013-06-09 Thread Simon Zehnder
Hi Dirk, thank you very much for this suggestion. I will time several approaches when I have finished the logic of my algorithm. Best Simon On Jun 8, 2013, at 10:23 PM, Dirk Eddelbuettel e...@debian.org wrote: Simon, You (in my eyes needlessly) complicate matters further with the S4

Re: [Rcpp-devel] Integer matrices in Rcpp and Armadillo

2013-06-08 Thread Simon Zehnder
could be, that I misunderstood your answer above, or that we were talking about two different things there. In this case please apologize my confusion. Best Simon On Jun 8, 2013, at 8:08 AM, Romain Francois rom...@r-enthusiasts.com wrote: Le 07/06/13 16:07, Simon Zehnder a écrit : Hi Romain

Re: [Rcpp-devel] Integer matrices in Rcpp and Armadillo

2013-06-07 Thread Simon Zehnder
June 2013 at 19:05, Simon Zehnder wrote: | | sorry I had overseen this message from you. Okay, so the explicit cast to SEXP together with the assignment operator makes the deal. But it still includes the reuse of memory right, i.e. the '=' does not call the copy constructor? | | But how

Re: [Rcpp-devel] Integer matrices in Rcpp and Armadillo

2013-06-07 Thread Simon Zehnder
Thank you Romain! All clear now! Best Simon On Jun 7, 2013, at 1:13 PM, Romain Francois rom...@r-enthusiasts.com wrote: Le 07/06/13 13:09, Simon Zehnder a écrit : HI Dirk, hi Romain, allright, this is now clear to me, if I want to reuse memory, the allocated memory from R (so

Re: [Rcpp-devel] Integer matrices in Rcpp and Armadillo

2013-06-07 Thread Simon Zehnder
::mat() avoids a copy by Rcpp::as() - which is just beautiful! Best Simon On Jun 7, 2013, at 1:19 PM, Simon Zehnder szehn...@uni-bonn.de wrote: Thank you Romain! All clear now! Best Simon On Jun 7, 2013, at 1:13 PM, Romain Francois rom...@r-enthusiasts.com wrote: Le 07/06

Re: [Rcpp-devel] Integer matrices in Rcpp and Armadillo

2013-06-07 Thread Simon Zehnder
. Best Simon On Jun 7, 2013, at 3:47 PM, Romain Francois rom...@r-enthusiasts.com wrote: Le 07/06/13 15:14, Simon Zehnder a écrit : Hi Romain, hi Dirk, sorry for posting here again, but I found something in some way connected to this discussion - and pretty interesting concerning the Rcpp

Re: [Rcpp-devel] Setting the R random seed from Rcpp

2013-06-07 Thread Simon Zehnder
Hi Matteo, I do not know what you really want to do, but if you want to replicate results, you could do the following in Rcpp before running the RNG: Rcpp::Environment baseEnv(package:base); Rcpp::Function setSeed = baseEnv[set.seed]; setSeed(0);//any other number would do it here Best

[Rcpp-devel] Integer matrices in Rcpp and Armadillo

2013-06-06 Thread Simon Zehnder
Hi Rcpp:Users, and Rcpp::Devels, I encountered the following problem when working today/yesterday on my project: 1. In R create an S4-object with the following slot: setClass(myclass, representation(S = array)) mclass - new(myclass, S = array(0, dim = c(100, 10))) 2. In C++ compile a function

Re: [Rcpp-devel] Integer matrices in Rcpp and Armadillo

2013-06-06 Thread Simon Zehnder
wrote: Le 06/06/13 18:03, Simon Zehnder a écrit : Hi Rcpp:Users, and Rcpp::Devels, I encountered the following problem when working today/yesterday on my project: 1. In R create an S4-object with the following slot: setClass(myclass, representation(S = array)) mclass - new(myclass

[Rcpp-devel] Warnings in build of RcppArmadillo project

2013-06-05 Thread Simon Zehnder
Hi Rcpp-Users and Rcpp-Devels, I just build an RcppArmadillo project on my computer using gcc-4.8.1 and the newest Version of RcppArmadillo. I got some warnings I cannot explain to myself. It builds the library and installs it. Nevertheless I would like to know more about my warnings: In

Re: [Rcpp-devel] Warnings in build of RcppArmadillo project

2013-06-05 Thread Simon Zehnder
happening in armadillo's code base. Le 05/06/13 16:23, Simon Zehnder a écrit : Hi Rcpp-Users and Rcpp-Devels, I just build an RcppArmadillo project on my computer using gcc-4.8.1 and the newest Version of RcppArmadillo. I got some warnings I cannot explain to myself. It builds the library

Re: [Rcpp-devel] Warnings in build of RcppArmadillo project

2013-06-05 Thread Simon Zehnder
Hi Romain, is revision 4331 already in RcppArmadillo 3.9.0? Best Simon On Jun 5, 2013, at 4:30 PM, Romain Francois rom...@r-enthusiasts.com wrote: Most of these are in fact happening in armadillo's code base. Le 05/06/13 16:23, Simon Zehnder a écrit : Hi Rcpp-Users and Rcpp-Devels, I

Re: [Rcpp-devel] Warnings in build of RcppArmadillo project

2013-06-05 Thread Simon Zehnder
Ah, I see. Thanks for the explanation! Best Simon On Jun 5, 2013, at 4:48 PM, Romain Francois rom...@r-enthusiasts.com wrote: The change affects Rcpp, not RcppArmadillo. Le 05/06/13 16:45, Simon Zehnder a écrit : Hi Romain, is revision 4331 already in RcppArmadillo 3.9.0? Best

Re: [Rcpp-devel] Conversion of Rcpp::Vector Rcpp::List and Rcpp::Matrix to std objects - OpenMP

2013-06-03 Thread Simon Zehnder
Hi Asis, parallel computing is a very delicate task in programming, which depends on one side on your hardware architecture and on the other side on your commands in your software. 1. If a sequential code is faster than the parallel code, check if something is differently programmed or, if

Re: [Rcpp-devel] Conversion of Rcpp::Vector Rcpp::List and Rcpp::Matrix to std objects - OpenMP

2013-06-02 Thread Simon Zehnder
Hi Asis, I have cloned the git project and successfully installed it to R. The 'testCptsRealLive.R' does not work though. The 'load' command has problems reading the binary file. Nevertheless, I took a look at your OpenMP code: SEXP conditionalProbabilityTables( SEXP uniqueEdgeLengths, SEXP

Re: [Rcpp-devel] Conversion of Rcpp::Vector Rcpp::List and Rcpp::Matrix to std objects - OpenMP

2013-06-01 Thread Simon Zehnder
Hi Asis, I'll write between the lines here: On Jun 1, 2013, at 1:45 PM, Asis Hallab asis.hal...@gmail.com wrote: Dear Dirk and Simon, thank you very much for your help. I have made a few experiments and am very puzzled. Maybe I could bother you with advise on this? The experiments on

Re: [Rcpp-devel] Conversion of Rcpp::Vector Rcpp::List and Rcpp::Matrix to std objects - OpenMP

2013-05-31 Thread Simon Zehnder
Hi Asis, in addition to what Dirk said I can tell you, that at least Armadillo Objects do work accurate with OpenMP. I used in my code an '#pragma omp parallel for' directive on a lot of Armadillo matrices without any problems. Be aware of what clauses you use in your parallel setting. There

Re: [Rcpp-devel] R RcppArmadillo decomposition disagreement

2013-05-31 Thread Simon Zehnder
Isn't this actually an option when installing R (http://www.cran.r-project.org/doc/manuals/R-admin.html)? If it hasn't been explicitly stated in the configure stage of R via --with-lapack, R uses its internal routines. Best Simon On May 31, 2013, at 9:31 PM, Colin Rundel run...@gmail.com

Re: [Rcpp-devel] R RcppArmadillo decomposition disagreement

2013-05-31 Thread Simon Zehnder
Hi Colin, I also found an article referring to a blog of Dirk: http://techyoubaji.blogspot.de/2012/12/r-uses-different-blas-and-lapack.html Maybe it is interesting for you. Best Simon On May 31, 2013, at 9:55 PM, Simon Zehnder szehn...@uni-bonn.de wrote: Isn't this actually an option when

[Rcpp-devel] Access Rcpp::List element

2013-05-26 Thread Simon Zehnder
Dear Rcpp::Devels and Rcpp::Users, I have maybe some trivial questions. 1. If I use Rcpp::NumericVector A(someVector), does it reuse memory from someVector for A? From http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-quickref.pdf I would say it does, whereas

Re: [Rcpp-devel] Access Rcpp::List element

2013-05-26 Thread Simon Zehnder
the time to do it immediately (I also do not understand how you find the time for all of this as I guess you are working for a company). Best Simon On May 26, 2013, at 3:42 PM, Dirk Eddelbuettel e...@debian.org wrote: Simon, On 26 May 2013 at 15:20, Simon Zehnder wrote: | Dear Rcpp

Re: [Rcpp-devel] Access Rcpp::List element

2013-05-26 Thread Simon Zehnder
, here. Thanks for making this clear! Best Simon On May 26, 2013, at 7:28 PM, Dirk Eddelbuettel e...@debian.org wrote: On 26 May 2013 at 18:41, Simon Zehnder wrote: | Apologize for being imprecise in my second question. I try to rephrase it here, so more members can understand: | | 2

[Rcpp-devel] Random Numbers in Armadillo - What algorithm?

2013-05-24 Thread Simon Zehnder
Dear Rcpp-Devels, I was wondering about the RNG in Armadillo (2.0 and 3.0 - functions rand and randu). What kind of algirthm does it use? Mersenne-Twister (Seed=0)? Best Simon ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org

[Rcpp-devel] Complex return values from C++ to R

2013-03-08 Thread Simon Zehnder
Dear Rcpp-Devels, I am at a point in my project where I think intensively about best implementation regarding performance (as my project contains Monte Carlo Markov Chain applications at its Core - this is important). Two facts to know about my project: 1. In R, my project relies fully on S4

[Rcpp-devel] Initiate NumericMatrix in class constructor from S4 slot

2013-03-05 Thread Simon Zehnder
Dear Rcpp-Devels, I am a little confused right now with the following setting: I have a C++ class with for example the following header #include RcppArmadillo.h class FirstClass { public: Rcpp::NumericMatrix M; FirstClass(Rcpp::S4 classS4);

Re: [Rcpp-devel] Initiate NumericMatrix in class constructor from S4 slot

2013-03-05 Thread Simon Zehnder
in your constructor anyway, something like: FirstClass::FirstClass(Rcpp::S4 classS4) : M( (SEXP)classS4.slot(M_R)) {} Hiwever, i will add the missing constructor if this does not break anything else. Romain Le 6 mars 2013 à 08:14, Simon Zehnder szehn...@uni-bonn.de a écrit : Dear Rcpp

Re: [Rcpp-devel] Mersenne Twister in RcppArmadillo?

2013-03-04 Thread Simon Zehnder
Simon On Mar 3, 2013, at 2:02 PM, Dirk Eddelbuettel e...@debian.org wrote: Simon, On 3 March 2013 at 11:52, Simon Zehnder wrote: | Hi Dirk, | | I recognized the function rnorm in Rcpp. But as I work most times with RcppArmadillo and Armadillo objects I wanted to avoid constructing

Re: [Rcpp-devel] Mersenne Twister in RcppArmadillo?

2013-03-03 Thread Simon Zehnder
the C++11 standard? Does it come soon? Best Simon On Mar 2, 2013, at 11:09 PM, Dirk Eddelbuettel e...@debian.org wrote: On 2 March 2013 at 22:40, Simon Zehnder wrote: | That was fast Dirk! I will update my packages on Monday! Thank you for that quick release! Well I have been

  1   2   >