Last active
April 25, 2019 01:50
-
-
Save renato04/f1c60b0a6d05df59e7da4154ca1e418d to your computer and use it in GitHub Desktop.
R - Data Structures Samples
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
vet_logical = c(T, T, F, F) | |
vet_int = 11:14 | |
vet_numeric = c(1.0, 2.0, 3.0, 4.0) | |
vet_text = letters[1:4] | |
vet_imaginary = c((1 + 1i), (1 + 1i), (1 + 1i), (1 + 1i)) | |
my_list = list(vet_logico, vet_int, vet_numerico, vet_texto, vet_imaginario) | |
my_matrix = matrix(seq(from=2, by=2, length.out = 16), nrow = 4) | |
frame = data.frame( | |
"logico" = vet_logical, | |
"int" = vet_int, | |
"num" = vet_numeric, | |
"tex" = vet_text, | |
"imaginario" = vet_imaginary, | |
row.names = c("L1", "L2", "L3", "L4") | |
) | |
rows = c("L1", "L2", "L3", "L4") | |
row.names(frame) <- c("L1", "L2", "L3", "L4") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment