 <p>I'm confused in that two arguments to your function, my_dt1 and my_dt2, do not seem to be used. All you seem to be doing is adding a column to DF2? If so, just do this:</p> <pre><code>b_func = function(my_dt, my_col) { my_dt[[my_col]] = as.Date("2015-09-21") + 0:4 my_dt } </code></pre>