Skip to content

Instantly share code, notes, and snippets.

@DATAUNIRIO
Created November 2, 2021 15:08
Show Gist options
  • Save DATAUNIRIO/ee2e61119402c5b7c88b4921d1d179b9 to your computer and use it in GitHub Desktop.
Save DATAUNIRIO/ee2e61119402c5b7c88b4921d1d179b9 to your computer and use it in GitHub Desktop.
seleção de variáveis com tidyverse
#https://dplyr.tidyverse.org/reference/select.html
library(dplyr)
data("mtcars")
dim(mtcars)
names(mtcars)
banco_inclusao_variaveis <- mtcars %>% select(mpg,disp,hp)
banco_exclusao_variaveis <- mtcars %>% select(-c(vs,am,gear))
dim(mtcars)
dim(banco_inclusao_variaveis)
dim(banco_exclusao_variaveis)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment