Have you tried putting the a,b, and c column names you are passing in quotes 
i.e. as strings? Currently your function is expecting separate objects with 
those names.

The select function itself can accept unquoted column names, as can others in 
R, because specific processing they do in the background.  Your wrapper 
function doesn’t have that facility.  I have a very limited understanding of 
the details to explain this but it is one of the ‘gotchas’ when starting.

No doubt others will point out that the approach you are using is probably not 
the best (lacks flexibility; some column names are hard coded etc), but if it 
gets the job done, to some extent that’s all that matters.

> On 14 May 2021, at 23:06, Kai Yang via R-help <r-help@r-project.org> wrote:
> 

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to