Skip to content
Back to formatted view

Raw Message

Message-ID: <girtol$p3a$1@ger.gmane.org>
Date: 2008-12-23T23:55:01Z
From: Thomas Mang
Subject: .C and 'temporaries'

Hello,

Before I get into troubles I ask here:

I make a call to a C function using .C. What I would like to know is if 
the arguments in the .C call can also be 'temporary' objects.

An example will illustrate this:

# here we don't have a temporary
Obj1 = 5
.C("Func", as.integer(Obj1 ), ...) # certainly works

# here we do have a temporary
Obj2 = 5
.C("Func", as.integer(Obj2 + 100), ...) # is this guaranteed to work?


Is the second call valid?
Is it also valid if DUP = FALSE, or only if DUP = TRUE ?

Thanks,
Thomas