Re: [Rd] R CMD check does not recognize S4 functions inside other functions?

2009-08-28 Thread Sylvain Loiseau
It looks as if it is very related to the message I posted just some day ago ("Problem with standard generic methods in Matrix package"). Sylvain On Fri, 28 Aug 2009 03:12:48 +0200, Giles Hooker wrote: I am developing a new R package and am now checking it for submission to CRAN. The some f

Re: [Rd] R CMD check does not recognize S4 functions inside other functions?

2009-08-28 Thread Martin Maechler
> "GH" == Giles Hooker > on Thu, 27 Aug 2009 21:12:48 -0400 writes: GH> I am developing a new R package and am now checking it for submission to GH> CRAN. GH> The some functions in the package make use of the sparse matrix routines GH> in the package 'Matrix'. GH

Re: [Rd] Problem with standard generic methods in Matrix package

2009-08-28 Thread Martin Maechler
> "SL" == Sylvain Loiseau > on Thu, 27 Aug 2009 18:06:50 +0200 writes: SL> Hello, >> I think it would still be most efficient, >> if you do 'R CMD build ' >> and make the .tar.gz file available. >> >> Ideally for every reader of this list, from a "public

Re: [Rd] Clarifications please.

2009-08-28 Thread Abhijit Bera
Hi Martin Here's the code. I'm stuck at one point. I cannot figure out how to print the dimnames. I've commented it in my code: int main (int argc, char** argv) { SEXP e,t1,t2,val; int errorOccurred,nx,ny,i,j; double *v; char x[1024],y[1024]; Rf_initEmbeddedR(argc, argv);

Re: [Rd] Wishlist: specify the border color of boxes in legend() (PR#13913)

2009-08-28 Thread maechler
> "FS" == Frederic Schutz > on Thu, 27 Aug 2009 13:25:16 +0200 (CEST) writes: FS> I could not find a way to specify the border color of the boxes drawn in FS> a legend, so that the legend can match exactly the colors of the actual FS> plot (e.g. in the case of two superim

Re: [Rd] R CMD check does not recognize S4 functions inside other functions?

2009-08-28 Thread Henric (Nilsson) Winell
On 2009-08-28 09:58, Martin Maechler wrote: "GH" == Giles Hooker on Thu, 27 Aug 2009 21:12:48 -0400 writes: GH> I am developing a new R package and am now checking it for submission to GH> CRAN. GH> The some functions in the package make use of the sparse matrix routines

Re: [Rd] Clarifications please.

2009-08-28 Thread Simon Urbanek
On Aug 28, 2009, at 7:41 AM, Abhijit Bera wrote: Hi Martin Here's the code. I'm stuck at one point. I cannot figure out how to print the dimnames. I've commented it in my code: int main (int argc, char** argv) { SEXP e,t1,t2,val; int errorOccurred,nx,ny,i,j; double *v; char x[

Re: [Rd] Clarifications please.

2009-08-28 Thread Abhijit Bera
Hi Simon Thanks. All the confusion between CHAR and STRING. First I read this : http://www1.cuni.cz/~obo/r_surprises.html In the meantime I got your reply. Then I read the documentation and it made sense! Regards Abhijit Bera On Fri, Aug 28, 2009 at 6:49 PM, Simon Urbanek wrote: > > On Aug 2

Re: [Rd] Clarifications please.

2009-08-28 Thread Abhijit Bera
Hi Simon/Martin I have updated the code. I think I may be doing mistakes with PROTECT and UNPROTECT but the code works fine, no errors or warnings so far. Please suggest any improvements/changes. #include #include #include #include int main (int argc, char** argv) { SEXP e,t1,t2,val;

[Rd] S4: names stripped during instantiation of grandchildren of numeric class

2009-08-28 Thread Vitalie S.
Dear All, A small inconsistency (it's probably not even a buglet): setClass("A", contains="numeric") [1] "A" names(new("A", c(a=23))) [1] "a" setClass("B", contains="A") [1] "B" names(new("B", c(a=23))) NULL This is exactly that kind of behavior S4 was invented for, you expect n

Re: [Rd] Clarifications please.

2009-08-28 Thread Simon Urbanek
On Aug 28, 2009, at 9:42 AM, Abhijit Bera wrote: Hi Simon Thanks. All the confusion between CHAR and STRING. First I read this : http://www1.cuni.cz/~obo/r_surprises.html Uh, oh, that doc confuses things even more and is not really correct (well, the author admits that he has no idea, bu

Re: [Rd] S4 Generics and NAMESPACE : justified warning ?

2009-08-28 Thread Yohan Chalabi
"MM" == Martin Morgan on Tue, 18 Aug 2009 06:15:50 -0700 Hi Martin, Thanks for your response. MM> Commenting as a user, there's no guarantee that the 'plot' MM> generic MM> defined in pkgA is derived from graphics::plot via setGeneric; MM> pkgA MM> could define it's own

Re: [Rd] ARM v7/Linux Port/cross-compile?

2009-08-28 Thread Andrew Piskorski
On Thu, Aug 27, 2009 at 06:36:38PM -0400, Simon Urbanek wrote: > It was fairly straight-forward to build R (like any other cross- > compilation). The tricky part is to install packages (if you are truly > cross-compiling on another architecture) which I solved by using multi- > arch R (which c

[Rd] Simpler example of embedding R in C++ (Was: Clarifications please.)

2009-08-28 Thread Dirk Eddelbuettel
Abhijit, I think you are making your life harder than you need to. Consider this simple C++ program implementing your example (of loading fPortfolio, converting the data in SWX.RET to a matrix M, exporting M to C++ and showing its content): e...@ron:~/svn/rinside/pkg/inst/examples> cat rinsi

Re: [Rd] ARM v7/Linux Port/cross-compile?

2009-08-28 Thread Simon Urbanek
On Aug 28, 2009, at 11:18 , Andrew Piskorski wrote: On Thu, Aug 27, 2009 at 06:36:38PM -0400, Simon Urbanek wrote: It was fairly straight-forward to build R (like any other cross- compilation). The tricky part is to install packages (if you are truly cross-compiling on another architecture)

[Rd] names<- in data.frame (PR#13916)

2009-08-28 Thread vitosmail
Full_Name: Spinu Vitalie Version: 2.9.0 OS: Windows Submission from: (NULL) (130.115.113.15) In assignment of "zero length" names to data.frame: > tdf <- data.frame(rbind(c(1, 2), c(1, 2))) > names(tdf) <- c("", "") > tdf structure(c("1", "1"), class = "AsIs") structure(c("2", "2"), class = "A