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

Simon Urbanek simon.urbanek at r-project.org
Wed Mar 16 19:01:46 CET 2005


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).


More information about the R-devel mailing list