Ok, suppose I create a very simple histogram with my function:
hist(my.fun(100))
The title of my histogram show Histogram of my.fun(100)
. This is perfectly fine for me! I like the way R automatically recognize my.fun(100)
and put it in the title and label.
But then I do complex computation, says:
n <- my.complex.algo.that.compute.size(args)
hist(my.fun(n))
This time, the title show Histogram of my.fun(n)
. Which gives no clue on how large is n
. I know that n
will be evaluate to some integer, suppose that for this run n == 42
, I like to see the title of histogram show Histogram of my.fun(42)
instead.
Is this possible without specifying the title by myself (no main=paste(...)
). I've try these and fail:
hist(my.fun(`n`))
hist(my.fun(eval(n)))