On 18/01/2010 7:51 PM, Rolf Turner wrote:
Thanks to Berton Gunter and Peter Ehlers who both effectively solved
my problem. Prof. Gunter's solution, slightly more succinct, is:
foo <- function(x)
{
if(is.name(sb <- substitute(x))) deparse(sb)
else eval(sb)
}
(appropriately modified to fi
Thanks to Berton Gunter and Peter Ehlers who both effectively solved
my problem. Prof. Gunter's solution, slightly more succinct, is:
foo <- function(x)
{
if(is.name(sb <- substitute(x))) deparse(sb)
else eval(sb)
}
(appropriately modified to fit into the ``mv()'' context.
Duncan Murdoch
Rolf Turner wrote:
I have been trying to write a function mv(a,b) to move an
object a to object b. It returns no value, but only
exists for this side effect. Basically it just does
b <- a; rm(a). With some checking and prompting about
over-writing.
The thing is, I'd like to be able to use ei
On 18/01/2010 3:22 PM, Rolf Turner wrote:
I have been trying to write a function mv(a,b) to move an
object a to object b. It returns no value, but only
exists for this side effect. Basically it just does
b <- a; rm(a). With some checking and prompting about
over-writing.
The thing is, I'd lik
I have been trying to write a function mv(a,b) to move an
object a to object b. It returns no value, but only
exists for this side effect. Basically it just does
b <- a; rm(a). With some checking and prompting about
over-writing.
The thing is, I'd like to be able to use either call by
name or
5 matches
Mail list logo