Can an R function access its own name?

Can you write a function that prints out its own name?

(without hard-coding it in, obviously)

Answers


You sure can.

fun <- function(x, y, z) deparse(match.call()[[1]])
fun(1,2,3)
# [1] "fun"

Need Your Help

How to force the order of where conditions in ActiveRecord

ruby-on-rails activerecord where

As far as I know, the "where" method in ActiveRecord doesn't grantee the order of conditions when creating the sql command with an attribute hash. For example:

Theory and algorithm behind Java garbage collection

java garbage-collection

I read at many places, but did not find a place where I can learn about :