David Winsemius comcast.net> writes:
>
>
> There is also the `do.call` function to construct proper calls from a
> character that matches the name of a function
>
> f1 = function(foo) {
> do.call(foo, list(1,2))
>}
>
> f1("+")
> [1] 3
>
Thanks David, this information has bee
Gabor Grothendieck gmail.com> writes:
>
> See ?match.fun
>
> There is also an enhanced version, match.funfn, in the gsubfn package.
>
Thanks Gabor!
--Sergio.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEAS
Duncan Murdoch gmail.com> writes:
> You are seeing the effects of the evaluator and parser being helpful.
> When you say
>
> foo(1,2)
>
>
Thanks Duncan!
--Sergio
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-
On Mar 29, 2012, at 1:34 PM, Duncan Murdoch wrote:
On 29/03/2012 1:02 PM, Julio Sergio wrote:
I learnt that functions can be handled as objects, the same way the
variables
are. So, the following is perfectly valid:
> f = function(a, b) {
+print(a)
+print(b)
+ }
>
> f1 = function(f
On Thu, Mar 29, 2012 at 1:02 PM, Julio Sergio wrote:
> I learnt that functions can be handled as objects, the same way the variables
> are. So, the following is perfectly valid:
>
>> f = function(a, b) {
> + print(a)
> + print(b)
> + }
>>
>> f1 = function(foo) {
> + foo(1,2)
> + }
>>
>> f
On 29/03/2012 1:02 PM, Julio Sergio wrote:
I learnt that functions can be handled as objects, the same way the variables
are. So, the following is perfectly valid:
> f = function(a, b) {
+print(a)
+print(b)
+ }
>
> f1 = function(foo) {
+foo(1,2)
+ }
>
> f1(f)
[1] 1
[1] 2
>
I also
I learnt that functions can be handled as objects, the same way the variables
are. So, the following is perfectly valid:
> f = function(a, b) {
+print(a)
+print(b)
+ }
>
> f1 = function(foo) {
+foo(1,2)
+ }
>
> f1(f)
[1] 1
[1] 2
>
I also know that operators are functions, so, I ca
7 matches
Mail list logo