Re: [Rd] .Call - applying setAttrib(x, R_DimSymbol, s) to a matrix being an element of a list

From: Simon Urbanek <simon.urbanek_at_r-project.org>
Date: Wed 16 Mar 2005 - 18:01:46 GMT

Oleg,

you gave us only a fragment of your code, so I can only guess what the problem is:

On Mar 16, 2005, at 12:40 PM, Oleg Sklyar wrote:

> // converting element into a matrix
> setAttrib(element, R_DimSymbol, imgSize);

What is imgSize? The behavior you describe seems as if you re-using the imgSize SEXP in all elements. AFAIR in your case setAttrib doesn't copy the value, so you need to do so yourself (or alloc new dim array for each element).

Cheers,
Simon



R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu Mar 17 05:04:24 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:02 GMT