Revisão R

Revisão em RStudio

#1.1 CONJUNTO
peso<-c(100,56,86,60,98,69)

#1.2 LENGTH verifica quantas observações tem o conjunto
n<-length(peso)
n
[1] 6
#1.3 SOMA
sum(peso)
[1] 469
#1.4 SEQUENCIA
# (:) indica sequencia contínua
# (1,60,3) sequencia com vírgula: 
#n1-> início, n2 -> fim, n3 -> intervalos
seq<-seq(1:60)
seq
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
[26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
[51] 51 52 53 54 55 56 57 58 59 60
seq1<-seq(1,60,3)
seq1
 [1]  1  4  7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58
seq2<-seq(100,1)
seq2
  [1] 100  99  98  97  96  95  94  93  92  91  90  89  88  87  86  85  84  83
 [19]  82  81  80  79  78  77  76  75  74  73  72  71  70  69  68  67  66  65
 [37]  64  63  62  61  60  59  58  57  56  55  54  53  52  51  50  49  48  47
 [55]  46  45  44  43  42  41  40  39  38  37  36  35  34  33  32  31  30  29
 [73]  28  27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11
 [91]  10   9   8   7   6   5   4   3   2   1
#1.5 MATRIX
x<-matrix(c(45,13,44,39,26,100,56,60,86,60,1.70,1.50,1.65,
            1.69,1.70),5,3)
x
     [,1] [,2] [,3]
[1,]   45  100 1.70
[2,]   13   56 1.50
[3,]   44   60 1.65
[4,]   39   86 1.69
[5,]   26   60 1.70
#[] identifica a posição do dado na matrix
#n1 -> linha, n2 -> coluna
x[4,2]
[1] 86
x[3,]
[1] 44.00 60.00  1.65
x[3,1:2] #linha 3 coluna 1 e 2
[1] 44 60
x[3,-2] #linha 3 excluindo coluna 2
[1] 44.00  1.65
x[c(1,5),] #linha 1 e 5
     [,1] [,2] [,3]
[1,]   45  100  1.7
[2,]   26   60  1.7
x[c(2,4),] #linha 2 e 4
     [,1] [,2] [,3]
[1,]   13   56 1.50
[2,]   39   86 1.69
x[,c(1,3)] #coluna 1 e 3
     [,1] [,2]
[1,]   45 1.70
[2,]   13 1.50
[3,]   44 1.65
[4,]   39 1.69
[5,]   26 1.70
x[,-2] #coluna 1 e 3 excluindo 2
     [,1] [,2]
[1,]   45 1.70
[2,]   13 1.50
[3,]   44 1.65
[4,]   39 1.69
[5,]   26 1.70
x[c(-2,-4),] #linha 1, 3 e 5 excluindo 2 e 4
     [,1] [,2] [,3]
[1,]   45  100 1.70
[2,]   44   60 1.65
[3,]   26   60 1.70

  Lendo bancos quantitativos externos

#Session > Set Working Diretory > Choose Directory...
#h=T identifica que o conjunto possui títulos.
ndados<-read.table("notas.txt",h=T)

attach(ndados)
#O comando attach() serve para tornar as colunas (variáveis) de um 
#conjunto de dados diretamente acessíveis pelo nome.

#2.1 IDENTIFICANDO QUARTIS
#determinar apenas colunas numéricas
#2,3,5 indica a posição dos quartis
pos<-summary(Nota)
pos
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  351.2   612.0   640.5   634.2   672.4   749.6 
q1<-as.numeric(pos[2])
q1
[1] 612.0025
q2<-as.numeric(pos[3])
q2
[1] 640.48
q3<-as.numeric(pos[5])
q3
[1] 672.405
#2.2 DEFININDO NÍVEIS
#NULL é um banco de dados vazio
Nivel<-NULL
Nivel
NULL
Nivel[Nota<=q1]<-"Nível 1"

Nivel[Nota>q1&Nota<=q2]<-"Nível 2"
Nivel
  [1] NA        NA        NA        NA        NA        "Nível 1" NA       
  [8] NA        NA        NA        NA        "Nível 1" "Nível 1" "Nível 1"
 [15] "Nível 1" NA        NA        NA        NA        NA        "Nível 2"
 [22] "Nível 1" NA        NA        NA        NA        NA        "Nível 1"
 [29] NA        NA        NA        NA        "Nível 2" "Nível 1" NA       
 [36] NA        NA        "Nível 2" "Nível 2" "Nível 1" NA        NA       
 [43] NA        NA        "Nível 2" "Nível 1" NA        "Nível 2" "Nível 2"
 [50] "Nível 2" "Nível 2" "Nível 1" NA        NA        NA        NA       
 [57] "Nível 2" "Nível 2" NA        NA        NA        "Nível 2" "Nível 2"
 [64] NA        NA        NA        "Nível 2" "Nível 2" "Nível 1" "Nível 1"
 [71] NA        NA        "Nível 2" "Nível 2" "Nível 2" "Nível 1" "Nível 1"
 [78] "Nível 1" NA        NA        NA        NA        NA        NA       
 [85] NA        NA        NA        "Nível 2" "Nível 1" "Nível 2" "Nível 2"
 [92] "Nível 2" "Nível 1" "Nível 1" "Nível 1" NA        NA        NA       
 [99] "Nível 2" "Nível 2" "Nível 1" NA        NA        NA        NA       
[106] NA        "Nível 1" NA        NA        NA        "Nível 2" "Nível 2"
[113] "Nível 1" NA        NA        NA        "Nível 2" "Nível 2" "Nível 1"
[120] "Nível 1" "Nível 1" "Nível 1" "Nível 1" NA        NA        "Nível 2"
[127] "Nível 2" "Nível 1" NA        "Nível 2" "Nível 2" "Nível 2" "Nível 1"
[134] NA        NA        NA        "Nível 2" "Nível 1" NA        NA       
[141] NA        "Nível 2" "Nível 2" NA        NA        NA        "Nível 2"
[148] "Nível 2" "Nível 1" NA        NA        NA        NA        NA       
[155] NA        NA        NA        NA        "Nível 2" NA        NA       
[162] "Nível 2" "Nível 2" "Nível 1" "Nível 1" "Nível 1" NA        "Nível 2"
[169] "Nível 2" "Nível 1" "Nível 1" "Nível 1" NA        NA        NA       
[176] NA        "Nível 2" "Nível 1" NA        NA        NA        "Nível 2"
[183] "Nível 1" NA        NA        NA        "Nível 2" "Nível 2" "Nível 1"
[190] "Nível 1" "Nível 1" "Nível 1" "Nível 1" "Nível 2" "Nível 2" "Nível 2"
[197] "Nível 2" "Nível 1" NA        NA        NA        NA        NA       
[204] "Nível 1" NA        NA        NA        NA        "Nível 2" "Nível 1"
[211] NA        NA        NA        "Nível 2" "Nível 2" "Nível 1" NA       
[218] NA        "Nível 2" "Nível 2" "Nível 2" "Nível 1" "Nível 1" "Nível 1"
[225] "Nível 1" "Nível 1" NA        NA        NA        NA        NA       
[232] NA        "Nível 1" "Nível 1" "Nível 1" NA        "Nível 2" "Nível 2"
[239] "Nível 2" "Nível 1" "Nível 1" NA        NA        NA        NA       
[246] "Nível 2" "Nível 2" "Nível 2" "Nível 2" "Nível 2" "Nível 1" "Nível 1"
[253] "Nível 1" NA        NA        NA        NA        NA        "Nível 1"
[260] "Nível 1" "Nível 1" "Nível 1" NA        NA        NA        "Nível 2"
[267] "Nível 2" NA        NA        NA        "Nível 2" "Nível 2" "Nível 1"
[274] "Nível 1" NA        NA        NA        "Nível 2" "Nível 2" "Nível 1"
[281] "Nível 1" NA        NA        NA        NA        NA        "Nível 1"
[288] NA        NA        NA        "Nível 2" "Nível 2" "Nível 1" NA       
[295] "Nível 2" "Nível 1" "Nível 1" "Nível 1"
Nivel[Nota>q2&Nota<=q3]<-"Nível 3"
Nivel
  [1] NA        "Nível 3" "Nível 3" "Nível 3" "Nível 3" "Nível 1" NA       
  [8] NA        NA        "Nível 3" "Nível 3" "Nível 1" "Nível 1" "Nível 1"
 [15] "Nível 1" NA        NA        NA        NA        NA        "Nível 2"
 [22] "Nível 1" NA        NA        NA        "Nível 3" "Nível 3" "Nível 1"
 [29] NA        "Nível 3" "Nível 3" "Nível 3" "Nível 2" "Nível 1" "Nível 3"
 [36] "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1" NA        NA       
 [43] "Nível 3" "Nível 3" "Nível 2" "Nível 1" "Nível 3" "Nível 2" "Nível 2"
 [50] "Nível 2" "Nível 2" "Nível 1" NA        "Nível 3" "Nível 3" "Nível 3"
 [57] "Nível 2" "Nível 2" "Nível 3" "Nível 3" "Nível 3" "Nível 2" "Nível 2"
 [64] NA        NA        "Nível 3" "Nível 2" "Nível 2" "Nível 1" "Nível 1"
 [71] "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 2" "Nível 1" "Nível 1"
 [78] "Nível 1" NA        NA        NA        NA        NA        NA       
 [85] NA        NA        "Nível 3" "Nível 2" "Nível 1" "Nível 2" "Nível 2"
 [92] "Nível 2" "Nível 1" "Nível 1" "Nível 1" NA        "Nível 3" "Nível 3"
 [99] "Nível 2" "Nível 2" "Nível 1" NA        NA        NA        NA       
[106] NA        "Nível 1" NA        NA        "Nível 3" "Nível 2" "Nível 2"
[113] "Nível 1" "Nível 3" "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1"
[120] "Nível 1" "Nível 1" "Nível 1" "Nível 1" NA        NA        "Nível 2"
[127] "Nível 2" "Nível 1" NA        "Nível 2" "Nível 2" "Nível 2" "Nível 1"
[134] NA        NA        "Nível 3" "Nível 2" "Nível 1" NA        NA       
[141] "Nível 3" "Nível 2" "Nível 2" NA        "Nível 3" "Nível 3" "Nível 2"
[148] "Nível 2" "Nível 1" NA        NA        NA        "Nível 3" "Nível 3"
[155] NA        NA        NA        "Nível 3" "Nível 2" "Nível 3" "Nível 3"
[162] "Nível 2" "Nível 2" "Nível 1" "Nível 1" "Nível 1" NA        "Nível 2"
[169] "Nível 2" "Nível 1" "Nível 1" "Nível 1" NA        "Nível 3" "Nível 3"
[176] "Nível 3" "Nível 2" "Nível 1" NA        NA        NA        "Nível 2"
[183] "Nível 1" NA        "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1"
[190] "Nível 1" "Nível 1" "Nível 1" "Nível 1" "Nível 2" "Nível 2" "Nível 2"
[197] "Nível 2" "Nível 1" NA        NA        NA        "Nível 3" "Nível 3"
[204] "Nível 1" NA        NA        "Nível 3" "Nível 3" "Nível 2" "Nível 1"
[211] "Nível 3" "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1" "Nível 3"
[218] "Nível 3" "Nível 2" "Nível 2" "Nível 2" "Nível 1" "Nível 1" "Nível 1"
[225] "Nível 1" "Nível 1" NA        NA        NA        NA        NA       
[232] "Nível 3" "Nível 1" "Nível 1" "Nível 1" "Nível 3" "Nível 2" "Nível 2"
[239] "Nível 2" "Nível 1" "Nível 1" "Nível 3" "Nível 3" "Nível 3" "Nível 3"
[246] "Nível 2" "Nível 2" "Nível 2" "Nível 2" "Nível 2" "Nível 1" "Nível 1"
[253] "Nível 1" NA        NA        NA        NA        "Nível 3" "Nível 1"
[260] "Nível 1" "Nível 1" "Nível 1" "Nível 3" "Nível 3" "Nível 3" "Nível 2"
[267] "Nível 2" NA        "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1"
[274] "Nível 1" "Nível 3" "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1"
[281] "Nível 1" NA        NA        NA        NA        NA        "Nível 1"
[288] NA        "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1" "Nível 3"
[295] "Nível 2" "Nível 1" "Nível 1" "Nível 1"
Nivel[Nota>q3]<-"Nível 4"
Nivel
  [1] "Nível 4" "Nível 3" "Nível 3" "Nível 3" "Nível 3" "Nível 1" "Nível 4"
  [8] "Nível 4" "Nível 4" "Nível 3" "Nível 3" "Nível 1" "Nível 1" "Nível 1"
 [15] "Nível 1" "Nível 4" "Nível 4" "Nível 4" "Nível 4" "Nível 4" "Nível 2"
 [22] "Nível 1" "Nível 4" "Nível 4" "Nível 4" "Nível 3" "Nível 3" "Nível 1"
 [29] "Nível 4" "Nível 3" "Nível 3" "Nível 3" "Nível 2" "Nível 1" "Nível 3"
 [36] "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1" "Nível 4" "Nível 4"
 [43] "Nível 3" "Nível 3" "Nível 2" "Nível 1" "Nível 3" "Nível 2" "Nível 2"
 [50] "Nível 2" "Nível 2" "Nível 1" "Nível 4" "Nível 3" "Nível 3" "Nível 3"
 [57] "Nível 2" "Nível 2" "Nível 3" "Nível 3" "Nível 3" "Nível 2" "Nível 2"
 [64] "Nível 4" "Nível 4" "Nível 3" "Nível 2" "Nível 2" "Nível 1" "Nível 1"
 [71] "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 2" "Nível 1" "Nível 1"
 [78] "Nível 1" "Nível 4" "Nível 4" "Nível 4" "Nível 4" "Nível 4" "Nível 4"
 [85] "Nível 4" "Nível 4" "Nível 3" "Nível 2" "Nível 1" "Nível 2" "Nível 2"
 [92] "Nível 2" "Nível 1" "Nível 1" "Nível 1" "Nível 4" "Nível 3" "Nível 3"
 [99] "Nível 2" "Nível 2" "Nível 1" "Nível 4" "Nível 4" "Nível 4" "Nível 4"
[106] "Nível 4" "Nível 1" "Nível 4" "Nível 4" "Nível 3" "Nível 2" "Nível 2"
[113] "Nível 1" "Nível 3" "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1"
[120] "Nível 1" "Nível 1" "Nível 1" "Nível 1" "Nível 4" "Nível 4" "Nível 2"
[127] "Nível 2" "Nível 1" "Nível 4" "Nível 2" "Nível 2" "Nível 2" "Nível 1"
[134] "Nível 4" "Nível 4" "Nível 3" "Nível 2" "Nível 1" "Nível 4" "Nível 4"
[141] "Nível 3" "Nível 2" "Nível 2" "Nível 4" "Nível 3" "Nível 3" "Nível 2"
[148] "Nível 2" "Nível 1" "Nível 4" "Nível 4" "Nível 4" "Nível 3" "Nível 3"
[155] "Nível 4" "Nível 4" "Nível 4" "Nível 3" "Nível 2" "Nível 3" "Nível 3"
[162] "Nível 2" "Nível 2" "Nível 1" "Nível 1" "Nível 1" "Nível 4" "Nível 2"
[169] "Nível 2" "Nível 1" "Nível 1" "Nível 1" "Nível 4" "Nível 3" "Nível 3"
[176] "Nível 3" "Nível 2" "Nível 1" "Nível 4" "Nível 4" "Nível 4" "Nível 2"
[183] "Nível 1" "Nível 4" "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1"
[190] "Nível 1" "Nível 1" "Nível 1" "Nível 1" "Nível 2" "Nível 2" "Nível 2"
[197] "Nível 2" "Nível 1" "Nível 4" "Nível 4" "Nível 4" "Nível 3" "Nível 3"
[204] "Nível 1" "Nível 4" "Nível 4" "Nível 3" "Nível 3" "Nível 2" "Nível 1"
[211] "Nível 3" "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1" "Nível 3"
[218] "Nível 3" "Nível 2" "Nível 2" "Nível 2" "Nível 1" "Nível 1" "Nível 1"
[225] "Nível 1" "Nível 1" "Nível 4" "Nível 4" "Nível 4" "Nível 4" "Nível 4"
[232] "Nível 3" "Nível 1" "Nível 1" "Nível 1" "Nível 3" "Nível 2" "Nível 2"
[239] "Nível 2" "Nível 1" "Nível 1" "Nível 3" "Nível 3" "Nível 3" "Nível 3"
[246] "Nível 2" "Nível 2" "Nível 2" "Nível 2" "Nível 2" "Nível 1" "Nível 1"
[253] "Nível 1" "Nível 4" "Nível 4" "Nível 4" "Nível 4" "Nível 3" "Nível 1"
[260] "Nível 1" "Nível 1" "Nível 1" "Nível 3" "Nível 3" "Nível 3" "Nível 2"
[267] "Nível 2" "Nível 4" "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1"
[274] "Nível 1" "Nível 3" "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1"
[281] "Nível 1" "Nível 4" "Nível 4" "Nível 4" "Nível 4" "Nível 4" "Nível 1"
[288] "Nível 4" "Nível 3" "Nível 3" "Nível 2" "Nível 2" "Nível 1" "Nível 3"
[295] "Nível 2" "Nível 1" "Nível 1" "Nível 1"
table(Nivel)
Nivel
Nível 1 Nível 2 Nível 3 Nível 4 
     75      74      74      75 
#2.3 MÉDIA DE NOTAS DE NOVA IGUACU
NI<-Nota[Cidade=="Nova_Iguacu"]
NI
 [1] 692.30 671.60 668.57 659.20 651.00 563.03 714.83 701.64 688.44 650.10
[11] 644.34 606.36 553.37 534.33 483.68 746.48 739.12 714.52 698.82 687.02
[21] 621.30 593.50 730.16 710.06 680.35 667.82 661.43 462.54 689.15 662.23
[31] 659.37 646.48 637.33 594.95 663.42 663.32 650.02 634.03 629.47 611.78
[41] 687.52 676.50 665.20 649.30 624.93 560.45 658.93 639.05 632.02 625.93
[51] 614.08 571.03 674.15 669.67 661.15 657.58 631.25 622.70 664.83 660.78
[61] 646.77 622.93 617.45
ni<-length(NI)
ni
[1] 63
nimedia<-mean(NI)
nimedia
[1] 645.5819
nimediana<- median(NI)
nimediana
[1] 657.58

  Grafico Boxplot

library(ggplot2)
ggplot(ndados, aes(x=Cidade, y= Nota)) + geom_boxplot() + 
  labs(title = "RELAÇÃO NOTAS POR CIDADE", x="Cidade", y="Nota") + 
  theme(axis.text.x = element_text(angle = 0, hjust = 1))

  Lendo bancos qualitativos externos

#3 IMPORTANDO ARQUIVO
#setwd para localizar arquivo nos documentos. Copiar o caminho do diretório e 
#inverter a barra
#sep = ";" identifica que o conjunto está separado por ;

setwd("C:/Users/math_/Documents/Rstudio")
dados <- read.table("REV SIS1.csv", h = T, sep = ";")
head(dados)
       Country.of.Research     Continent Study.Method    Study.Type
1 United States of America North America  Qualitative Longitudinal 
2           United Kingdom        Europe  Qualitative   Transversal
3           United Kingdom        Europe  Qualitative   Transversal
4                 Portgual        Europe Quantitative   Transversal
5           United Kingdom        Europe  Unspecified   Unspecified
6                    Spain        Europe Quantitative   Transversal
  Students.Specific.Profile    Graduation.Period         Research.Method
1          Low Income Women Middle of Graduation              Interviews
2               Unspecified          Unspecified            Focus Groups
3               Unspecified          Unspecified            Focus Groups
4               Unspecified  First Year Students Latent Profile Analisys
5         Business Students Middle of Graduation             Unspecified
6  Non-Traditional Students  First Year Students                  Survey
  Expectation.Type Study.Field   Study.Amplitude
1           Reward   Sociology Single University
2      Performance   Education Single University
3           Reward  Psychology Single University
4          General  Psychology Single University
5      Performance   Education Single University
6          General   Education Single University
attach(dados)
dados1<- dados[-(51:108), ]

#names visualiza os títulos
names(dados1)
 [1] "Country.of.Research"       "Continent"                
 [3] "Study.Method"              "Study.Type"               
 [5] "Students.Specific.Profile" "Graduation.Period"        
 [7] "Research.Method"           "Expectation.Type"         
 [9] "Study.Field"               "Study.Amplitude"          
data.frame(dados1)
        Country.of.Research     Continent Study.Method    Study.Type
1  United States of America North America  Qualitative Longitudinal 
2            United Kingdom        Europe  Qualitative   Transversal
3            United Kingdom        Europe  Qualitative   Transversal
4                  Portgual        Europe Quantitative   Transversal
5            United Kingdom        Europe  Unspecified   Unspecified
6                     Spain        Europe Quantitative   Transversal
7                  Portugal        Europe Quantitative   Transversal
8                    Brazil South America Quantitative    Comparison
9  United States of America North America  Qualitative   Transversal
10                Argentina South America Quantitative   Transversal
11                    China          Asia        Mixed   Unspecified
12               Bangladesh          Asia Quantitative   Transversal
13                  Ireland        Europe Quantitative    Case Study
14                   Canada North America Quantitative   Transversal
15                     Iran          Asia        Mixed   Transversal
16                   Brazil South America Quantitative    Comparison
17 United States of America North America        Mixed    Comparison
18                   Russia      Multiple   Comparison   Transversal
19                 Colombia South America   Comparison    Comparison
20              Unspecified   Unspecified  Theoretical Bibliographic
21                Australia       Oceania Quantitative   Transversal
22                   Brazil South America Quantitative    Comparison
23                 Pakistan          Asia Quantitative    Comparison
24           United Kingdom        Europe Quantitative    Comparison
25              Netherlands        Europe  Qualitative Bibliographic
26                   Brazil South America  Qualitative Longitudinal 
27                    Spain        Europe Quantitative   Transversal
28                   Turkey          Asia Quantitative   Transversal
29                    China          Asia Quantitative   Transversal
30                   Greece        Europe Quantitative   Transversal
31                   Brazil South America Quantitative Longitudinal 
32                    China          Asia        Mixed Longitudinal 
33           United Kingdom        Europe  Qualitative   Transversal
34                   Turkey          Asia  Qualitative   Transversal
35                   Mexico North America        Mixed Longitudinal 
36           United Kingdom North America  Qualitative   Transversal
37                 Portugal        Europe Quantitative   Transversal
38       Multiple Countries          Asia Quantitative   Transversal
39 United States of America North America  Qualitative    Case Study
40 United States of America North America Quantitative   Transversal
41           United Kingdom        Europe  Qualitative Longitudinal 
42          North Macedonia        Europe Quantitative    Comparison
43                    Italy        Europe        Mixed   Transversal
44                   Brazil South America  Qualitative   Transversal
45 United States of America North America Quantitative   Transversal
46     United Arab Emirates          Asia Quantitative   Transversal
47                 Colombia South America Quantitative   Transversal
48                  Ireland        Europe  Qualitative    Case Study
49             South Africa        Africa Quantitative    Comparison
50                    Spain        Europe Quantitative   Transversal
      Students.Specific.Profile    Graduation.Period
1              Low Income Women Middle of Graduation
2                   Unspecified          Unspecified
3                   Unspecified          Unspecified
4                   Unspecified  First Year Students
5             Business Students Middle of Graduation
6      Non-Traditional Students  First Year Students
7                   Unspecified          Unspecified
8          Non-Working Students  First Year Students
9              Black Immigrants          Unspecified
10                  Unspecified          Unspecified
11           African Immigrants          Unspecified
12  Private University Students          Unspecified
13                  Unspecified  First Year Students
14                  Unspecified  First Year Students
15                  Unspecified  First Year Students
16                  Unspecified          Unspecified
17                       Varied          Unspecified
18                  Unspecified          Unspecified
19                  Unspecified  First Year Students
20                  Unspecified          Unspecified
21                  Unspecified  First Year Students
22                  Unspecified  First Year Students
23 Public Institutions Students          Unspecified
24                  Unspecified  First Year Students
25                  Unspecified          Unspecified
26 First generation HE Students          Unspecified
27      Health Science Students          Unspecified
28                  Unspecified          Unspecified
29    Blended Learning Students  First Year Students
30   Teacher Education Students          Early Years
31 Public Institutions Students          Early Years
32       International Students          Unspecified
33                  Unspecified  First Year Students
34                  Unspecified          Unspecified
35                  Unspecified  First Year Students
36         Scholarship Students  First Year Students
37                  Unspecified  First Year Students
38                  Unspecified          Unspecified
39            Chinese  Students          Unspecified
40                  Unspecified          Unspecified
41                  Unspecified  First Year Students
42                  Unspecified          Unspecified
43                  Unspecified          Unspecified
44            Medicine Students          Early Years
45                  Unspecified          Unspecified
46                  Unspecified          Unspecified
47           Dentistry Students  First Year Students
48  Private University Students  First Year Students
49                  Unspecified          Unspecified
50                  Unspecified  First Year Students
                            Research.Method Expectation.Type    Study.Field
1                                Interviews           Reward      Sociology
2                              Focus Groups      Performance      Education
3                              Focus Groups           Reward     Psychology
4                   Latent Profile Analisys          General     Psychology
5                               Unspecified      Performance      Education
6                                    Survey          General      Education
7                                    Survey          General     Psychology
8                                    Survey      Performance     Psychology
9                               Unspecified          General      Sociology
10                                   Survey          General      Education
11                            Mixed Methods          Service      Education
12                                   Survey          General      Education
13                               Interviews          General      Education
14                                   Survey          General     Psychology
15                            Mixed Methods          Service     Psychology
16                                   Survey      Performance     Psychology
17                            Mixed Methods           Reward      Education
18                                   Survey           Reward      Education
19                                   Survey          General     Psychology
20           Theoretical framework building          General      Education
21                                   Survey          General     Psychology
22                                   Survey          General     Psychology
23                                   Survey          Service      Education
24                                   Survey           Reward      Education
25           Theoretical framework building          General     Philosophy
26                               Interviews          General      Education
27                                   Survey      Performance         Health
28                                   Survey          Service      Education
29                                   Survey      Performance      Education
30                                   Survey      Performance      Education
31                                   Survey          Service Administration
32                                   Survey          General     Psychology
33                               Interviews          Service      Education
34                               Interviews          General      Education
35                            Mixed Methods          General      Education
36                               Interviews          General      Education
37                                   Survey          General      Education
38                                   Survey          General      Education
39 Interpretative phenomenological analysis      Performance      Education
40                                   Survey          Service      Education
41                                   Survey          General      Education
42                   Previous Data Analysis           Reward        Economy
43                                   Survey          General      Education
44                               Interviews      Performance         Health
45                                   Survey       Enviroment      Education
46                                   Survey          General      Education
47                                   Survey      Performance      Education
48                               Interviews          General      Education
49                                   Survey          Service      Education
50                                   Survey          General      Education
        Study.Amplitude
1     Single University
2     Single University
3     Single University
4     Single University
5     Single University
6     Single University
7  Various Universities
8  Various Universities
9  Various Universities
10    Single University
11    Single University
12 Various Universities
13    Single University
14    Single University
15 Various Universities
16    Single University
17 Various Universities
18 Various Universities
19    Single University
20          Unspecified
21    Single University
22 Various Universities
23 Various Universities
24    Single University
25          Unspecified
26    Single University
27    Single University
28    Single University
29    Single University
30    Single University
31    Single University
32 Various Universities
33    Single University
34    Single University
35 Various Universities
36    Single University
37    Single University
38 Various Universities
39    Single University
40    Single University
41    Single University
42    Single University
43    Single University
44    Single University
45    Single University
46 Various Universities
47    Single University
48    Single University
49    Single University
50    Single University
table_country<-table(dados1$Country.of.Research)
table(dados1$Continent)

       Africa          Asia        Europe      Multiple North America 
            1            10            18             1             9 
      Oceania South America   Unspecified 
            1             9             1 
table(dados1$Study.Method)

  Comparison        Mixed  Qualitative Quantitative  Theoretical  Unspecified 
           2            6           13           27            1            1 
table(dados1$Study.Type)

Bibliographic    Case Study    Comparison Longitudinal    Transversal 
            2             3             9             6            28 
  Unspecified 
            2 
freq_country<-data.frame(table_country)

  Gráfico Barra

library(ggplot2)
ggplot(freq_country, aes(x=Var1, y=Freq)) + 
  geom_col() +
  labs(title = "Country Frequency", x = "Country", y = "Frequency") +
  theme(axis.text.x = element_text(angle = 90, hjust = 1))