Hi all!
I have lots of functions called in the following pattern
'NameOfFunctionNumber' where the name always stays the same and the number
varies from 1 to 98.
Another function which I run in advance returns the number of the function
which has to be called next.
Now I want to combine
Try using 'get' to return the object specified as a character string:
f1-function()1
f2 - function()2
z - 'f2'
z
[1] f2
get(z)()
[1] 2
On 12/8/06, Katharina Vedovelli [EMAIL PROTECTED] wrote:
Hi all!
I have lots of functions called in the following pattern
'NameOfFunctionNumber'
If I understand what you need,
Number=2
x - paste(NameOfFunction,as.character(Number),sep=)
x
[1] NameOfFunction2
And you can use do.call(x, ...) to get your function.
Hope it helps,
Scionforbai
__
R-help@stat.math.ethz.ch mailing list
: Katharina Vedovelli [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent: Friday, December 08, 2006 2:57 PM
Subject: [R] Remove from a string
Hi all!
I have lots of functions called in the following pattern
'NameOfFunctionNumber' where the name always stays the same and the
number
varies from 1
On Fri, 2006-12-08 at 14:57 +0100, Katharina Vedovelli wrote:
Hi all!
I have lots of functions called in the following pattern
'NameOfFunctionNumber' where the name always stays the same and the number
varies from 1 to 98.
Another function which I run in advance returns the number of the
-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Katharina
Vedovelli
Sent: Friday, December 08, 2006 6:57 AM
To: r-help@stat.math.ethz.ch
Subject: [R] Remove from a string
Hi all!
I have lots of functions called in the following pattern
'NameOfFunctionNumber' where the name always
-help@stat.math.ethz.ch
Subject: Re: [R] Remove from a string
On Fri, 2006-12-08 at 14:57 +0100, Katharina Vedovelli wrote:
Hi all!
I have lots of functions called in the following pattern
'NameOfFunctionNumber' where the name always stays the same and the number
varies from 1 to 98.
Another