Thanks a lot for your comments. In fact I had an idea that maybe it is a
pointer that is transferred after Simon's yesterday's commnent. So
generally I should always allocVector for imgSize before passing it and
just let the garbage collector to clean them afterwards if I understand
right.
Bes
Oleg,
On Mar 16, 2005, at 8:34 PM, Oleg Sklyar wrote:
Sorry, it is always a tradeoff - either to explain or put a
relatively large code,
Just posting all R related commands is sufficient ;) - in your case
that would be the single imgSize alloc and the assignments- but the
full code is fine, too.
On Thu, 17 Mar 2005, Oleg Sklyar wrote:
Dear Simon,
you gave us only a fragment of your code, so I can only guess what the
problem is:
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
Dear Simon,
> you gave us only a fragment of your code, so I can only guess what
the problem is:
> 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
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
Dear R developers,
I am writing some C code that loads multiple images into a list of R
matrices. The whole R object is created within the C code. To simplify
coding, elements of the list are first created as vectors and then
converted to corresponding matrices using setAttrib(x, R_DimSymbol, s)