r - Select (dplyr) operator with '-' -


how use select (dplyr library) operator name containing '-'? example:

adultuci %>% select(capital-gain)  

caused:

error

try this

data.frame(`a-b` = 1, c = 2, check.names = false) %>%    select(`a-b`) #   a-b # 1   1 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -