title: Printing a function description
body: <p>I have defined a function, let's say, <code>f = function(x) {x*x}</code>, and I would like to print this equation at a later point. For example, I would like <code>paste(f)</code> to output "x*x". Is this possible? It should be simple, although I am open to alternative solutions and suggestions. </p>
  
  <p>This is part of a simple graphing program that I wrote that plot expected lines vs. empirical values. The program is below:</p>
  
  <pre><code>generateGraphs &lt;- function() {
    # Vector of running time functions for each implementation running time
    v &lt;- c(function(x){x*x}, function(x){x*x}, function(x){x*log(x)})
  
    # Vector of file names to be read and graphed
    titles &lt;- c("alpha", "beta", "gamma")
  
    # Cycle through each problem, reading and graphing the data  
    for (i in 1:3) {
      data &lt;- getData(titles[[i]])
      plotSaveData(data, v[[i]], titles[[i]])
    }
  }
  
  plotSaveData &lt;- function(data, expectedOrderEquation, graphTitle) {
    # Define vectors for our x coordinates and two sets of y coordinates 
    empirical &lt;- log(data$Runtime)
    nums &lt;- log(data$N)
    expected &lt;- log(expectedOrderEquation(data$N))
  
    #   # Start PNG device driver to save output to figure.png
    png(filename=paste0(graphTitle, ".png"), height=295, width=300, bg="white")
  
    # Compute the largest y value used in the data
    max_y &lt;- max(empirical)
  
    # Graph empirical running time on log-log scale
    plot(nums, empirical, pch=21, type="p", col="blue", ann=FALSE)
  
    # Graph expected running time with red line
    lines(nums, expected, col="red", type="l")    
  
    # Create box around plot
    box()
  
    # Create a title with a red, bold/italic font
    title(main=paste0("RunningTime: ",graphTitle), col.main="red", font.main=4)
  
    # Label the x and y axes with dark green text
    title(xlab= "log(array length)", col.lab=rgb(0,0.5,0))
    title(ylab= "log(RunningTime)", col.lab=rgb(0,0.5,0))
  
    # Create a legend at (.01, max_y) that is slightly smaller 
    # (cex) and uses the same line colors and points used by 
    # the actual plots
    legend(min(nums), max_y, c("Empirical",paste("Expected: ", FUNCTION_HERE!!!)), cex=0.8, col=c("blue","red"), pch=21:22, lty=1:2) # NEED TO PRINT FUNCTION EQUATION HERE
  
    # Turn off device driver (to flush output to png)
    dev.off()
  }
  
  getData &lt;- function(graph.title, summarize = FALSE) {
    ## 'id' is a vector of length 1 indicating the file (or problem)
    ## number. 
    file &lt;- paste0(graph.title,".csv")
    data &lt;- read.csv(file)
  
    ## 'summarize' is a logical indicating whether a summary of
    ## the data should be printed to the console; the default is
    ## FALSE
    if (summarize) {
      print(summary(data))
    }
    return (data)
  }
  </code></pre>