From simon.urbanek at r-project.org  Wed Mar 16 19:01:46 2005
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Wed Mar 16 19:02:07 2005
Subject: [Rd] .Call - applying setAttrib(x, R_DimSymbol,
	s) to a matrix being an element of a list
In-Reply-To: <42386FA6.7040800@ebi.ac.uk>
References: <42386FA6.7040800@ebi.ac.uk>
Message-ID: <34C019CA-160A-4AFF-B622-CFB95201F5AD@r-project.org>

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


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