Last active
October 26, 2017 22:40
-
-
Save victorkurauchi/a3aae10624dbd5de4af340e3634ba187 to your computer and use it in GitHub Desktop.
3rd class working with R language
This file contains hidden or 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
attach(Banco_1) | |
selecao <- Banco_1 [,c('id', 'Situacao')] | |
selecao | |
selecao <- Banco_1 [10:20, c('id', 'Situacao')] | |
selecao | |
selecao <- Banco_1 [Banco_1$sexo == 'masculino',] | |
selecao | |
selecao <- Banco_1 [Banco_1$sexo == 'masculino' & Banco_1$idade >= 30,] | |
selecao | |
uniao <- rbind(Apend_1, Apend_2) | |
uniao | |
Apend_22$Lazer <- c('') | |
Apend_22 | |
library(plyr) | |
append <- rbind.fill(Apend_11, Apend_22) | |
append | |
chave <- merge(Apend_A, Apend_B, by=c('id')) | |
chave | |
greaterThan30 <- chave [chave$Idade >= 30,] | |
greaterThan30 | |
merge(Uniao_1, uniao_2, by=c('id'), all.x = TRUE) | |
merge(Uniao_1, uniao_2, by=c('id'), all.y = TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment