Re: [Rd] Define replacement functions

2015-05-04 Thread soeren . vogel
No. I fixed that, the NAMESPACE file now contains: S3method("[[<-", mylist) S3method("$<-", mylist) It still does not work. I also created a print method (print.mylist) which did work out of the box, regardless of being in the NAMESPACE file or not. Could it be somehow in here (also in my NAMES

[Rd] Define replacement functions

2015-05-04 Thread soeren . vogel
Hello I tried to define replacement functions for the class "mylist". When I test them in an active R session, they work -- however, when I put them into a package, they don't. Why and how to fix? make_my_list <- function( x, y ) { return(structure(list(x, y, class="mylist"))) } mylist

Re: [Rd] Compilation error Mac binary

2011-06-29 Thread soeren . vogel
On 29.06.2011, at 21:19, Dirk Eddelbuettel wrote: > Soeren just shown resilience and persistence in getting his package > written, built and now onto CRAN. The remaining step is to learn more about > cross-platform build issues. Because that is the (high) standard of CRAN, > and if you want to b

Re: [Rd] Compilation error Mac binary

2011-06-29 Thread soeren . vogel
Thanks Simon, Uwe and David for your helpful answers. English is not my primary language, so I was hypothesising a bit about the correct interpretation of "inlining" and "supply inside". I thought it meant copying the headers inside the package. I was already inspecting RQuantlib but I did, so f

Re: [Rd] Compilation error Mac binary

2011-06-29 Thread soeren . vogel
Hello David On 29.06.2011, at 15:56, David Winsemius wrote: > On Jun 29, 2011, at 5:33 AM, soeren.vo...@uzh.ch wrote: > >> Hello, the compilation of the GUTS package on CRAN for Mac produces the >> following error messages: >> >> http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/GUT

[Rd] Compilation error Mac binary

2011-06-29 Thread soeren . vogel
Hello, the compilation of the GUTS package on CRAN for Mac produces the following error messages: http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/GUTS-00install.html I guess it is some namespace collision, but I can not reproduce it on my machine, it compiles fine here. What is the

[Rd] R CMD check on CRAN

2011-06-19 Thread soeren . vogel
Hello I have a package with a configure script (--include-something). How does the package pass the check on CRAN, that is, how should I signalise that check and install may need options? Thanks Sören __ R-devel@r-project.org mailing list https://sta

[Rd] Reference Classes, Generator Object

2011-06-10 Thread soeren . vogel
Hello, I am working with a reference class: Foo <- setRefClass("Bar", fields = list( a = "numeric"), methods = list( baz = function( xa ) a <<- xa ) ) x <- Foo$new() x$baz(2) x$a y <- new("Bar") y$baz(4) y$a But that might be confusing, since new(Foo) does not work and neither does Bar$new()

Re: [Rd] Interfacing a C++ class

2011-06-07 Thread soeren . vogel
On 06.06.2011, at 13:42, Romain Francois wrote: > Le 04/06/11 16:31, soeren.vo...@uzh.ch a écrit : > >> FOO is the C++ object, and Foo should be the S4 class. If the user creates >> an object, say bar, from class Foo, the creation process automatically makes >> a new FOO object relating to bar

Re: [Rd] S4 class, passing argument names to function, modify original

2011-06-04 Thread soeren . vogel
On 04.06.2011, at 15:41, Martin Morgan wrote: > On 06/04/2011 03:07 AM, soeren.vo...@uzh.ch wrote: > >> Hello, an S4 class "Foo" is defined with a setter, $. For several reasons, >> the setter calls a function, .foo.update(). However, bypassing the argument >> names of the setter does not work.

[Rd] Interfacing a C++ class

2011-06-04 Thread soeren . vogel
Hello Apologies for cross-posting, the discussion should (if) go to R-devel, but I also want to reach the rcpp-devel people. My C++ class FOO is a module available through Rcpp, and it works fine and is -- so far -- bug free. With trying to further develop my R package, I thought it was a good

[Rd] S4 class, passing argument names to function, modify original

2011-06-04 Thread soeren . vogel
Hello, an S4 class "Foo" is defined with a setter, $. For several reasons, the setter calls a function, .foo.update(). However, bypassing the argument names of the setter does not work. Question 1: Why not and how can I fix this? Question 2: What is the way to define either the function or the s

Re: [Rd] Create and access several instances of a C++ class from R

2011-05-13 Thread soeren . vogel
On 07.05.2011, at 11:15, Romain Francois wrote: > Try having do_bar with this signature: > > void do_bar(NumericVector data); > > And my advice would probably also to have your C field either as a > NumericVector. NumericVector is just a thin wrapper around the internal R > data structure. >

Re: [Rd] Create and access several instances of a C++ class from R

2011-05-07 Thread soeren . vogel
Hello Thanks again for help! We have attached version info, code, and contents of 00install.out at the end of the message. The package can be found here: http://sovo.md-hh.com/files/Foo.tar.gz We had followed Dirks explanation in the Rcpp modules vignette and the presentation of Rcpp modules.

[Rd] Create and access several instances of a C++ class from R

2011-05-06 Thread soeren . vogel
Hello We have a C++ class with several methods that manipulate an object. How is it possible to create several instances of that class *from R* in the C++ realm, which can then be accessed via a given name character? Symbolic example (we hope this illustrates our problem): // C++ side: class F