Because I needed to use concatenations of ~300 variables, I finally found out that simply putting new lines among the variables worked and avoided the error:
c(var1, var2, .... var100, var101, var102, ... var 200) # This will not work
c(var1, var2, .... var100,
var101, var102, ... var 200) # This will work
It is unclear to me why this happens, but I hope this empirical finding helps someone. It took me a long time to find a solution.