问题标签 [tidyselect]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
r - 自定义函数:将 tidyselect 参数作为字符串返回,而不执行参数
我想在我的自定义函数中创建一个段,其中参数“evars”的输入作为字符串返回,而不执行/评估参数。该参数是一个 tidyselect 函数,用于从数据框中提取指定的列。
简化功能:
现在我希望它将参数作为字符串返回,而不执行它:
但是,现在它将返回:
如何使函数返回参数“evars”的确切输入,而不执行它?
问题似乎是由于 tidyselect 函数 contains() 而发生的,例如此代码不会导致错误:
r - 使用 start_with 函数和 collapse::fselect 函数
starts_with("O")
fromtidyselect
适用于functiondplyr::select
但不适用于collapse::fselect
. 想知道我是否在这里遗漏了一些基本知识。