Created
November 2, 2021 15:08
-
-
Save DATAUNIRIO/ee2e61119402c5b7c88b4921d1d179b9 to your computer and use it in GitHub Desktop.
seleção de variáveis com tidyverse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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