title: Save available package methods with their source code in a text file
body: <p>we can see the source code of a method by typing method name in console like below example</p>
  
  <pre><code> &gt; rowMeans
  function (x, na.rm = FALSE, dims = 1L) 
  {
      if (is.data.frame(x)) 
          x &lt;- as.matrix(x)
      if (!is.array(x) || length(dn &lt;- dim(x)) &lt; 2L) 
          stop("'x' must be an array of at least two dimensions")
      if (dims &lt; 1L || dims &gt; length(dn) - 1L) 
          stop("invalid 'dims'")
      p &lt;- prod(dn[-(id &lt;- seq_len(dims))])
      dn &lt;- dn[id]
      z &lt;- if (is.complex(x)) 
          .Internal(rowMeans(Re(x), prod(dn), p, na.rm)) + (0+1i) * 
              .Internal(rowMeans(Im(x), prod(dn), p, na.rm))
      else .Internal(rowMeans(x, prod(dn), p, na.rm))
      if (length(dn) &gt; 1L) {
          dim(z) &lt;- dn
          dimnames(z) &lt;- dimnames(x)[id]
      }
      else names(z) &lt;- dimnames(x)[[1L]]
      z
  }
  &lt;bytecode: 0x0000000021b2fec8&gt;
  &lt;environment: namespace:base&gt;
  </code></pre>
  
  <p>But I want list all the method names and their source code available in package  one after the other. </p>