I have used this query to remove all items in my data set which are brought up in December 2017. I want to generalise this query by using variables instead of 'Dec' and '2017' as I will be firing this query every month.
q2_sql_1 <- subset(q2_sql_1, ! paste(CAL_MONTH,YEAR,sep="_") %in% c('Dec_2017'))
The overall code is quite big, so it would be troublesome to find this line and edit every time. So, I have specified 2 variables at the beginning which I will edit every month.
MMM <- "Dec"
YYYY <- "2017"
How do I use these variables in the above query?
q2_sql_1 <- subset(q2_sql_1, ! paste(CAL_MONTH,YEAR,sep="_") %in% paste0(MMM, "_", YYYY))
© 2016 Powered by mzan.com design MATCHINFO