title: Apply a function with a vector output to a list of dataframes
body: <p>I have a list of dataframes in my directory with a specific pattern. a sample few rows of a dataframe is shown:</p>
  <pre><code>&gt; head(data[,1:3])
  # A tibble: 6 x 3
    ...1   ...2  ...3
    &lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt;
  1 PLZ       1     0
  2 PLZ       1     0
  3 PLZ       2    11
  4 PLZ       2    11
  5 PLZ       3    11
  6 PLZ       3    11
  </code></pre>
  <p>I want to write a function that creates a dataframe of two columns, one the name of the each of the dataframes in the list, and two the <code>tail(data[,3], n = 1)</code> for each of the dataframes in the list.</p>
  <p>I try the following to first try and get last row of the third column of the dataframes:</p>
  <pre><code>span_function &lt;- function(baselines) {
  data &lt;- readxl::read_excel(allfiles, sheet = &quot;Bridge Object Girder Forces&quot;, 
                         skip = 3, col_names = FALSE)
  
  c(max(data[,3]))
  }
  
  baselines &lt;- list.files(pattern = &quot;\\d+-\\d+-S00&quot;, full.names = TRUE)
  Spans &lt;-  data.frame(t(sapply(baselines, span_function)))
  </code></pre>
  <p>I get the error:</p>
  <pre><code>Error: `path` must be a string
  </code></pre>