Last active
April 25, 2019 01:56
-
-
Save LetticiaNicoli/4bc69bb982f070d337bc3dfae21a39c8 to your computer and use it in GitHub Desktop.
R - First steps
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
#Vetores | |
vetor_inteiro <- 11:13 | |
vetor_numerico <- c(1.1,1.2,1.3) | |
vetor_texto <- letters[11:13] | |
vetor_imaginario <- c((1+1i), (1+2i),(1+1i)) | |
vetor_logico <- c(TRUE,FALSE,TRUE) | |
#Lista | |
lista <- list(vetor_inteiro,vetor_numerico,vetor_texto,vetor_imaginario,vetor_logico) | |
#Matriz | |
numerospares <- matrix(c(1:16*2), nrow =4) | |
#ou | |
numerospares <- matrix(seq(from = 2,by = 2,length.out = 16), nrow =4) | |
#Data Frame | |
dataframe <- data.frame("Inteiros" = vetor_inteiro, | |
"Numéricos" = vetor_numerico, | |
"Textos" = vetor_texto, | |
"Imaginários" = vetor_imaginario, | |
"Lógicos" = vetor_logico, row.names = c("L1","L2","L3")) | |
# row.names = paste0("X",1:3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment