[Rd] Building R package: “Found 'rand', possibly from 'rand' (C)” NOTE when checking package

2014-11-02 Thread January Weiner
I am building a package that makes a simple visualization. A part of the code is in C++, and utilizes the functions srand() and rand() for purposes not related to statistics (introducing random noise in the visualization). The package compiles without problems on my workstation(s), but when I submi

Re: [Rd] Building R package: “Found 'rand', possibly from 'rand' (C)” NOTE when checking package

2014-11-02 Thread Berend Hasselman
On 02-11-2014, at 12:20, January Weiner wrote: > I am building a package that makes a simple visualization. A part of > the code is in C++, and utilizes the functions srand() and rand() for > purposes not related to statistics (introducing random noise in the > visualization). The package compil

Re: [Rd] Building R package: “Found 'rand', possibly from 'rand' (C)” NOTE when checking package

2014-11-02 Thread Uwe Ligges
On 02.11.2014 12:40, Berend Hasselman wrote: On 02-11-2014, at 12:20, January Weiner wrote: I am building a package that makes a simple visualization. A part of the code is in C++, and utilizes the functions srand() and rand() for purposes not related to statistics (introducing random noise

Re: [Rd] Building R package: “Found 'rand', possibly from 'rand' (C)” NOTE when checking package

2014-11-02 Thread January Weiner
Dear Berend, thank you for your kind response. You are right, and I am blind. I will use the R RNG instead. Kind regards, j. On 2 November 2014 12:40, Berend Hasselman wrote: > > On 02-11-2014, at 12:20, January Weiner wrote: > >> I am building a package that makes a simple visualization. A

Re: [Rd] package vignettes build in the same R process?

2014-11-02 Thread Duncan Murdoch
On 01/11/2014, 8:44 PM, Martin Morgan wrote: > If I understand correctly, all vignettes in a package are built in the same R > process. Global options, loaded packages, etc., in an earlier vignette > persist > in later vignettes. This can introduce user confusion (e.g., when a later > vignette

Re: [Rd] Holding a large number of SEXPs in C++

2014-11-02 Thread Simon Knapp
Thanks Simon and sorry for taking so long to give this a go. I had thought of pair lists but got confused about how to protect the top level object only, as it seems that appending requires creating a new "top-level object". The following example seems to work (full example at https://gist.github.c