I am trying to create a value using sqldf and cannot seem to export it correctly. My current code creates a dataframe with one observation and one variable. I can then get that value with an extra step, but I feel like there has to be a more efficient way?
I am more familiar with SAS, and what I am basically trying to do is use sqldf to create what would be a macro in SAS. My code is below. The goal is to get the minimum wk_end_date given the conditions.
sqldf("select min(wk_end_date) as first_date
where wk_end_date>01/01/2017 and prod_nm LIKE '%Product_1%' AND Volume>0")