suppressPackageStartupMessages(library(tidyverse))
get_circle_tibble <- function(raio = 1, start = 0,...){
tibble(
Angle = seq(from = start, to = 2*pi, ...),
x = cos(Angle)*raio,
y = sin(Angle)*raio
)
}EstimaĂ§Ă£o de Pi
Utilizando loops
# Title:
# Author
# Date
# Comments:
# Pacotes
#library(tidyverse)
# NĂºmero de iteraĂ§Ă£o
N <- 10
# Variavel para acumular total de pontos dentro
totalDentro <- 0
# InicializaĂ§Ă£o de semente
set.seed("123")
# Loop
for (i in 1:N) {
cat("\nIteraĂ§Ă£o: ", i)
u.x <- runif(n = 1, min = -.5, max = .5)
u.y <- runif(n = 1, min = -.5, max = .5)
dentro <- u.x^2 + u.y^2 <= .25 # Teste se estĂ¡ dentro
totalDentro <- totalDentro + dentro # Adicione 1 caso verdade
#cat("\n\tValor Estimado: ", round(4*totalDentro/i, digits = 5))
} ##
## IteraĂ§Ă£o: 1
## IteraĂ§Ă£o: 2
## IteraĂ§Ă£o: 3
## IteraĂ§Ă£o: 4
## IteraĂ§Ă£o: 5
## IteraĂ§Ă£o: 6
## IteraĂ§Ă£o: 7
## IteraĂ§Ă£o: 8
## IteraĂ§Ă£o: 9
## IteraĂ§Ă£o: 10
rm(i)
piHat <- 4*totalDentro/N
cat("\n Pi: ", round(piHat, digits = 5))##
## Pi: 2.8
VetorizaĂ§Ă£o
N <- 1000
base <- tibble( #data.frame, data_frame
Order = 1:N,
U.x = runif(N, -1, 1),
U.y = runif(N, -1, 1),
Condicao = U.x^2 + U.y^2 <= 1,
Fator = if_else(Condicao, "sim", "nĂ£o")
)
base2 <- base %>%
mutate(Acumulado = cumsum(Condicao),
PiHat = 4*Acumulado/Order)
base2 %>% ggplot(aes(x = Order, y = PiHat)) +
geom_line(color = "blue") +
xlim(0,N) + ylim(0, 4) +
geom_hline(yintercept = pi, color = "red") +
ggtitle("EstimaĂ§Ă£o de Pi",
subtitle = "MĂ©todo de Monte Carlo")Diagrama representando simulaĂ§Ă£o:
ggplot() +
geom_path(aes(x,y),
color = "black",
data = get_circle_tibble(raio = 1,
start = 0, .01)) +
geom_path(aes(x,y),
color = "green",
data = get_circle_tibble(raio = sqrt(2),
start = -pi/4, pi/2)) +
geom_point(aes(x = U.x, y = U.y, color = Fator), data = base2)Comparando funções
pi_for <- function(N = 100, seed = 123){
stopifnot(is.numeric(N))
set.seed(seed)
#stopifnot(N>0)
if (N < 0) {
cat("\n N tem que ser positivo!")
return()
}
# Variavel para acumular total de pontos dentro
u.x <- array(NA, dim = N)
u.y <- array(NA, dim = N)
Condicao <- array(NA, dim = N)
Sum <- 0
Acumulado <- array(NA, dim = N)
# Loop
for (i in 1:N) {
#cat("\nIteraĂ§Ă£o: ", i)
u.x[i] <- runif(n = 1, min = -1, max = 1)
u.y[i] <- runif(n = 1, min = -1, max = 1)
Condicao[i] <- (u.x[i]^2 + u.y[i]^2 <= 1) # Teste se estĂ¡ dentro
Sum <- Sum + Condicao[i]
Acumulado[i] <- Sum
}
# Estimador
PiHat <- (Sum/N)*4
# Dados para gerar o grĂ¡fico
Dados <- tibble(
Order = 1:N,
U.x = u.x,
U.y = u.y,
Condicao = Condicao,
Acumulado = Acumulado,
PiHat = 4*(Acumulado/Order),
Fator = if_else(Condicao, "sim", "nĂ£o")
)
resultado <- list(PiHat = PiHat, Historico = Dados)
return(resultado)
}
pi_vector <- function(N = 100, seed = 123){
stopifnot(is.numeric(N))
set.seed(seed)
#stopifnot(N>0)
if (N < 0) {
cat("\n N tem que ser positivo!")
return()
}
Dados <- tibble( #data.frame, data_frame
Order = 1:N,
U.x = runif(N, -1, 1),
U.y = runif(N, -1, 1),
Condicao = U.x^2 + U.y^2 <= 1,
Fator = if_else(Condicao, "sim", "nĂ£o")
)
Dados <- Dados %>%
mutate(Acumulado = cumsum(Condicao),
PiHat = 4*Acumulado/Order)
resultado <- list(PiHat = Dados$PiHat[N], Historico = Dados)
return(resultado)
}IntroduĂ§Ă£o ao Rcpp / C++ / Armadillo
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::plugins("cpp11")]]
// [[Rcpp::export]]
DataFrame pi_rcpp(int N){
// Creating vector v
IntegerVector Order = Rcpp::seq_len(N);
NumericVector Ux = Rcpp::runif( N, -1.0, 1.0 );
NumericVector Uy = Rcpp::runif( N, -1.0, 1.0 );
IntegerVector Condicao = Rcpp::ifelse(pow(Ux,2) + pow(Uy, 2) <= 1, 1, 0);
IntegerVector Acumulado = Rcpp::cumsum(Condicao);
NumericVector PiHat = 4*as<NumericVector>(Acumulado)/as<NumericVector>(Order);
IntegerVector Fator = Condicao + 1;
Fator.attr("levels") = CharacterVector({"nĂ£o","sim"});
Fator.attr("class") = "factor";
// Creating DataFrame df
DataFrame df = DataFrame::create(
Named("U.x") = Ux,
Named("U.y") = Uy,
Named("Condicao") = Condicao,
Named("Acumulado") = Acumulado,
Named("PiHat") = PiHat,
Named("Fator") = Fator); //
return df;
}#include <RcppArmadillo.h>
using namespace Rcpp;
// [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::plugins("cpp11")]]
// [[Rcpp::export]]
List pi_arma(int N) {
arma::vec Order = arma::cumsum(arma::ones(N));
arma::vec Ux = 2*arma::randu<arma::vec>(N) - 1;
arma::vec Uy = 2*arma::randu<arma::vec>(N) - 1;
arma::vec Condicao = arma::conv_to<arma::vec>::from(pow(Ux, 2) + pow(Uy, 2) <= 1.0);
arma::vec Acumulado = arma::cumsum(Condicao);
arma::vec PiHat = 4.0*Acumulado/Order;
std::vector< std::string > Fator(N,"nĂ£o");
// for(int i = 0; i < N; i++) {
// if (Condicao(i) > 0.5) Fator.push_back("sim");
// else Fator.push_back("nĂ£o");
// }
//arma::vec::iterator it;
// for(it = Condicao.begin(); it != Condicao.end(); ++it)
// {
// if ( *it > 0.5) Fator.push_back("sim");
// else Fator.push_back("nĂ£o");
// }
for(int i = 0; i < N; i++){
if ( Condicao(i) > 0.5 ) Fator[i] = "sim";
}
// Creating DataFrame df
DataFrame df = DataFrame::create(
Named("U.x") = Ux,
Named("U.y") = Uy,
Named("Condicao") = Condicao,
Named("Acumulado") = Acumulado,
Named("PiHat") = PiHat,
Named("Fator") = Fator); // #_["stringsAsFactors"] = false
return df;
}#include <Rcpp.h>
#include <random>
using namespace Rcpp;
// [[Rcpp::plugins("cpp11")]]
// [[Rcpp::export]]
DataFrame pi_cpp(int N) {
std::vector<double> Order(N, 0.0);
std::vector<double> Ux(N, 0.0);
std::vector<double> Uy(N, 0.0);
std::vector<double> Condicao(N, 0.0);
std::vector<double> Acumulado(N, 0.0);
std::vector<double> PiHat(N, 0.0);
std::vector<std::string> Fator(N, "nĂ£o");
std::random_device rd; //Will be used to obtain a seed for the random number engine
std::mt19937 gen(rd()); //Standard mersenne_twister_engine seeded with rd()
std::uniform_real_distribution<> dis(-1.0, 1.0);
double Sum = 0;
for(int i = 0; i < N; i++){
Order[i] = i;
Ux[i] = dis(gen);
Uy[i] = dis(gen);
Condicao[i] = std::pow(Ux[i],2) + std::pow(Uy[i],2) <= 1;// [[Rcpp::export]]
Sum += Condicao[i];
Acumulado[i] = Sum;
PiHat[i] = 4*Acumulado[i]/(Order[i]+1.0);
if (Condicao[i] > .5) Fator[i] = "sim";
}
// Creating DataFrame df
DataFrame df = DataFrame::create(
Named("U.x") = Ux,
Named("U.y") = Uy,
Named("Condicao") = Condicao,
Named("Acumulado") = Acumulado,
Named("PiHat") = PiHat,
Named("Fator") = Fator); // #_["stringsAsFactors"] = false
return df;
}Benchmarking
results <- microbenchmark::microbenchmark(
For = pi_for(1000),
Vetor = pi_vector(1000),
Cpp = pi_cpp(1000),
Rcpp = pi_rcpp(1000),
Arma = pi_arma(1000)
)
print(results)## Unit: microseconds
## expr min lq mean median uq max neval
## For 6241.645 14591.567 28205.191 31824.642 35564.749 123364.094 100
## Vetor 2431.404 5541.475 7786.689 7282.468 7924.102 63743.730 100
## Cpp 797.104 1648.197 2618.665 2833.397 3290.716 8269.596 100
## Rcpp 577.528 1456.023 2068.690 2216.912 2532.627 4512.202 100
## Arma 627.186 1618.870 2712.326 2524.026 2885.984 19727.081 100
results %>%
ggplot(aes(x = expr, y = time, fill = expr)) +
geom_violin() +
coord_flip() +
ylab("Temo em Microsegundos") + xlab("Método") +
ggtitle("ComparaĂ§Ă£o de rotinas", subtitle = "IntroduĂ§Ă£o ao Rcpp") +
labs(fill = "Método")results %>%
ggplot(aes(x = expr, y = time, fill = expr)) +
geom_boxplot() +
coord_flip() +
ylab("Temo em Microsegundos") + xlab("Método") +
ggtitle("ComparaĂ§Ă£o de rotinas", subtitle = "IntroduĂ§Ă£o ao Rcpp") +
labs(fill = "Método")Sem considerar o For:
results %>% filter(expr != "For") %>%
ggplot(aes(x = expr, y = time, fill = expr)) +
geom_boxplot() +
coord_flip() +
ylab("Temo em Microsegundos") + xlab("Método") +
ggtitle("ComparaĂ§Ă£o de rotinas", subtitle = "IntroduĂ§Ă£o ao Rcpp") +
labs(fill = "MĂ©todo")ConvergĂªncia
pi_vector <- function(N = 100, seed = 123){
stopifnot(is.numeric(N))
set.seed(seed)
#stopifnot(N>0)
if (N < 0) {
cat("\n N tem que ser positivo!")
return()
}
Dados <- tibble( #data.frame, data_frame
Order = 1:N,
U.x = runif(N, -1, 1),
U.y = runif(N, -1, 1),
Condicao = U.x^2 + U.y^2 <= 1,
Fator = if_else(Condicao, "sim", "nĂ£o")
)
Dados <- Dados %>%
mutate(Acumulado = cumsum(Condicao),
PiHat = 4*Acumulado/Order)
resultado <- Dados
return(resultado)
}
R <- 30 # NĂºmero de Replicações
N <- 500 # NĂºmero de iterações por replicaĂ§Ă£o
Resultado <- tibble()
for (i in 1:R){
seed <- as.numeric(Sys.time())
historico <- pi_vector(N, seed = seed + i)
Resultado <- bind_rows(
Resultado,
tibble(
Order = 1:N,
PiHat = historico$PiHat,
Replica = i
)
)
}Resultado %>% group_by(Order) %>%
summarise(N = n(),
Média = mean(PiHat),
Mediana = median(PiHat),
VariĂ¢ncia = var(PiHat),
Q1 = quantile(PiHat, probs = .25),
Q3 = quantile(PiHat, probs = .75)) %>%
filter(Order <= 100) %>%
ggplot() + geom_errorbar(aes(x = Order, ymin = Q1, ymax = Q3)) +
geom_point(aes(x = Order, y = Mediana), color = "red")Resultado %>% group_by(Order) %>%
summarise(N = n(),
Média = mean(PiHat),
Mediana = median(PiHat),
VariĂ¢ncia = var(PiHat),
Q1 = quantile(PiHat, probs = .25),
Q3 = quantile(PiHat, probs = .75)) %>%
filter(Order <= 100) %>%
ggplot() + geom_ribbon(aes(x = Order, ymin = Q1, ymax = Q3), alpha =.2, fill = rgb(.2,.2,.5)) +
geom_line(aes(x = Order, y = Mediana), size = 1.2, color = "red")Resultado %>% filter(Order <= 40) %>%
ggplot() +
geom_boxplot(aes(x = factor(Order), y = PiHat))R Markdown
glimpse(heart)## Observations: 303
## Variables: 14
## $ age <int> 63, 37, 41, 56, 57, 57, 56, 44, 52, 57, 54, 48, 49, 6...
## $ sex <int> 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0,...
## $ cp <int> 3, 2, 1, 1, 0, 0, 1, 1, 2, 2, 0, 2, 1, 3, 3, 2, 2, 3,...
## $ trestbps <int> 145, 130, 130, 120, 120, 140, 140, 120, 172, 150, 140...
## $ chol <int> 233, 250, 204, 236, 354, 192, 294, 263, 199, 168, 239...
## $ fbs <int> 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,...
## $ restecg <int> 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1,...
## $ thalach <int> 150, 187, 172, 178, 163, 148, 153, 173, 162, 174, 160...
## $ exang <int> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,...
## $ oldpeak <dbl> 2.3, 3.5, 1.4, 0.8, 0.6, 0.4, 1.3, 0.0, 0.5, 1.6, 1.2...
## $ slope <int> 0, 0, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 0,...
## $ ca <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
## $ thal <int> 1, 2, 2, 2, 2, 1, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,...
## $ target <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
heart %>%
kable() %>%
kable_styling(bootstrap_options = "striped", full_width = F) %>%
scroll_box(height = "200px")| age | sex | cp | trestbps | chol | fbs | restecg | thalach | exang | oldpeak | slope | ca | thal | target |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 63 | 1 | 3 | 145 | 233 | 1 | 0 | 150 | 0 | 2.3 | 0 | 0 | 1 | 1 |
| 37 | 1 | 2 | 130 | 250 | 0 | 1 | 187 | 0 | 3.5 | 0 | 0 | 2 | 1 |
| 41 | 0 | 1 | 130 | 204 | 0 | 0 | 172 | 0 | 1.4 | 2 | 0 | 2 | 1 |
| 56 | 1 | 1 | 120 | 236 | 0 | 1 | 178 | 0 | 0.8 | 2 | 0 | 2 | 1 |
| 57 | 0 | 0 | 120 | 354 | 0 | 1 | 163 | 1 | 0.6 | 2 | 0 | 2 | 1 |
| 57 | 1 | 0 | 140 | 192 | 0 | 1 | 148 | 0 | 0.4 | 1 | 0 | 1 | 1 |
| 56 | 0 | 1 | 140 | 294 | 0 | 0 | 153 | 0 | 1.3 | 1 | 0 | 2 | 1 |
| 44 | 1 | 1 | 120 | 263 | 0 | 1 | 173 | 0 | 0.0 | 2 | 0 | 3 | 1 |
| 52 | 1 | 2 | 172 | 199 | 1 | 1 | 162 | 0 | 0.5 | 2 | 0 | 3 | 1 |
| 57 | 1 | 2 | 150 | 168 | 0 | 1 | 174 | 0 | 1.6 | 2 | 0 | 2 | 1 |
| 54 | 1 | 0 | 140 | 239 | 0 | 1 | 160 | 0 | 1.2 | 2 | 0 | 2 | 1 |
| 48 | 0 | 2 | 130 | 275 | 0 | 1 | 139 | 0 | 0.2 | 2 | 0 | 2 | 1 |
| 49 | 1 | 1 | 130 | 266 | 0 | 1 | 171 | 0 | 0.6 | 2 | 0 | 2 | 1 |
| 64 | 1 | 3 | 110 | 211 | 0 | 0 | 144 | 1 | 1.8 | 1 | 0 | 2 | 1 |
| 58 | 0 | 3 | 150 | 283 | 1 | 0 | 162 | 0 | 1.0 | 2 | 0 | 2 | 1 |
| 50 | 0 | 2 | 120 | 219 | 0 | 1 | 158 | 0 | 1.6 | 1 | 0 | 2 | 1 |
| 58 | 0 | 2 | 120 | 340 | 0 | 1 | 172 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 66 | 0 | 3 | 150 | 226 | 0 | 1 | 114 | 0 | 2.6 | 0 | 0 | 2 | 1 |
| 43 | 1 | 0 | 150 | 247 | 0 | 1 | 171 | 0 | 1.5 | 2 | 0 | 2 | 1 |
| 69 | 0 | 3 | 140 | 239 | 0 | 1 | 151 | 0 | 1.8 | 2 | 2 | 2 | 1 |
| 59 | 1 | 0 | 135 | 234 | 0 | 1 | 161 | 0 | 0.5 | 1 | 0 | 3 | 1 |
| 44 | 1 | 2 | 130 | 233 | 0 | 1 | 179 | 1 | 0.4 | 2 | 0 | 2 | 1 |
| 42 | 1 | 0 | 140 | 226 | 0 | 1 | 178 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 61 | 1 | 2 | 150 | 243 | 1 | 1 | 137 | 1 | 1.0 | 1 | 0 | 2 | 1 |
| 40 | 1 | 3 | 140 | 199 | 0 | 1 | 178 | 1 | 1.4 | 2 | 0 | 3 | 1 |
| 71 | 0 | 1 | 160 | 302 | 0 | 1 | 162 | 0 | 0.4 | 2 | 2 | 2 | 1 |
| 59 | 1 | 2 | 150 | 212 | 1 | 1 | 157 | 0 | 1.6 | 2 | 0 | 2 | 1 |
| 51 | 1 | 2 | 110 | 175 | 0 | 1 | 123 | 0 | 0.6 | 2 | 0 | 2 | 1 |
| 65 | 0 | 2 | 140 | 417 | 1 | 0 | 157 | 0 | 0.8 | 2 | 1 | 2 | 1 |
| 53 | 1 | 2 | 130 | 197 | 1 | 0 | 152 | 0 | 1.2 | 0 | 0 | 2 | 1 |
| 41 | 0 | 1 | 105 | 198 | 0 | 1 | 168 | 0 | 0.0 | 2 | 1 | 2 | 1 |
| 65 | 1 | 0 | 120 | 177 | 0 | 1 | 140 | 0 | 0.4 | 2 | 0 | 3 | 1 |
| 44 | 1 | 1 | 130 | 219 | 0 | 0 | 188 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 54 | 1 | 2 | 125 | 273 | 0 | 0 | 152 | 0 | 0.5 | 0 | 1 | 2 | 1 |
| 51 | 1 | 3 | 125 | 213 | 0 | 0 | 125 | 1 | 1.4 | 2 | 1 | 2 | 1 |
| 46 | 0 | 2 | 142 | 177 | 0 | 0 | 160 | 1 | 1.4 | 0 | 0 | 2 | 1 |
| 54 | 0 | 2 | 135 | 304 | 1 | 1 | 170 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 54 | 1 | 2 | 150 | 232 | 0 | 0 | 165 | 0 | 1.6 | 2 | 0 | 3 | 1 |
| 65 | 0 | 2 | 155 | 269 | 0 | 1 | 148 | 0 | 0.8 | 2 | 0 | 2 | 1 |
| 65 | 0 | 2 | 160 | 360 | 0 | 0 | 151 | 0 | 0.8 | 2 | 0 | 2 | 1 |
| 51 | 0 | 2 | 140 | 308 | 0 | 0 | 142 | 0 | 1.5 | 2 | 1 | 2 | 1 |
| 48 | 1 | 1 | 130 | 245 | 0 | 0 | 180 | 0 | 0.2 | 1 | 0 | 2 | 1 |
| 45 | 1 | 0 | 104 | 208 | 0 | 0 | 148 | 1 | 3.0 | 1 | 0 | 2 | 1 |
| 53 | 0 | 0 | 130 | 264 | 0 | 0 | 143 | 0 | 0.4 | 1 | 0 | 2 | 1 |
| 39 | 1 | 2 | 140 | 321 | 0 | 0 | 182 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 52 | 1 | 1 | 120 | 325 | 0 | 1 | 172 | 0 | 0.2 | 2 | 0 | 2 | 1 |
| 44 | 1 | 2 | 140 | 235 | 0 | 0 | 180 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 47 | 1 | 2 | 138 | 257 | 0 | 0 | 156 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 53 | 0 | 2 | 128 | 216 | 0 | 0 | 115 | 0 | 0.0 | 2 | 0 | 0 | 1 |
| 53 | 0 | 0 | 138 | 234 | 0 | 0 | 160 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 51 | 0 | 2 | 130 | 256 | 0 | 0 | 149 | 0 | 0.5 | 2 | 0 | 2 | 1 |
| 66 | 1 | 0 | 120 | 302 | 0 | 0 | 151 | 0 | 0.4 | 1 | 0 | 2 | 1 |
| 62 | 1 | 2 | 130 | 231 | 0 | 1 | 146 | 0 | 1.8 | 1 | 3 | 3 | 1 |
| 44 | 0 | 2 | 108 | 141 | 0 | 1 | 175 | 0 | 0.6 | 1 | 0 | 2 | 1 |
| 63 | 0 | 2 | 135 | 252 | 0 | 0 | 172 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 52 | 1 | 1 | 134 | 201 | 0 | 1 | 158 | 0 | 0.8 | 2 | 1 | 2 | 1 |
| 48 | 1 | 0 | 122 | 222 | 0 | 0 | 186 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 45 | 1 | 0 | 115 | 260 | 0 | 0 | 185 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 34 | 1 | 3 | 118 | 182 | 0 | 0 | 174 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 57 | 0 | 0 | 128 | 303 | 0 | 0 | 159 | 0 | 0.0 | 2 | 1 | 2 | 1 |
| 71 | 0 | 2 | 110 | 265 | 1 | 0 | 130 | 0 | 0.0 | 2 | 1 | 2 | 1 |
| 54 | 1 | 1 | 108 | 309 | 0 | 1 | 156 | 0 | 0.0 | 2 | 0 | 3 | 1 |
| 52 | 1 | 3 | 118 | 186 | 0 | 0 | 190 | 0 | 0.0 | 1 | 0 | 1 | 1 |
| 41 | 1 | 1 | 135 | 203 | 0 | 1 | 132 | 0 | 0.0 | 1 | 0 | 1 | 1 |
| 58 | 1 | 2 | 140 | 211 | 1 | 0 | 165 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 35 | 0 | 0 | 138 | 183 | 0 | 1 | 182 | 0 | 1.4 | 2 | 0 | 2 | 1 |
| 51 | 1 | 2 | 100 | 222 | 0 | 1 | 143 | 1 | 1.2 | 1 | 0 | 2 | 1 |
| 45 | 0 | 1 | 130 | 234 | 0 | 0 | 175 | 0 | 0.6 | 1 | 0 | 2 | 1 |
| 44 | 1 | 1 | 120 | 220 | 0 | 1 | 170 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 62 | 0 | 0 | 124 | 209 | 0 | 1 | 163 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 54 | 1 | 2 | 120 | 258 | 0 | 0 | 147 | 0 | 0.4 | 1 | 0 | 3 | 1 |
| 51 | 1 | 2 | 94 | 227 | 0 | 1 | 154 | 1 | 0.0 | 2 | 1 | 3 | 1 |
| 29 | 1 | 1 | 130 | 204 | 0 | 0 | 202 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 51 | 1 | 0 | 140 | 261 | 0 | 0 | 186 | 1 | 0.0 | 2 | 0 | 2 | 1 |
| 43 | 0 | 2 | 122 | 213 | 0 | 1 | 165 | 0 | 0.2 | 1 | 0 | 2 | 1 |
| 55 | 0 | 1 | 135 | 250 | 0 | 0 | 161 | 0 | 1.4 | 1 | 0 | 2 | 1 |
| 51 | 1 | 2 | 125 | 245 | 1 | 0 | 166 | 0 | 2.4 | 1 | 0 | 2 | 1 |
| 59 | 1 | 1 | 140 | 221 | 0 | 1 | 164 | 1 | 0.0 | 2 | 0 | 2 | 1 |
| 52 | 1 | 1 | 128 | 205 | 1 | 1 | 184 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 58 | 1 | 2 | 105 | 240 | 0 | 0 | 154 | 1 | 0.6 | 1 | 0 | 3 | 1 |
| 41 | 1 | 2 | 112 | 250 | 0 | 1 | 179 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 45 | 1 | 1 | 128 | 308 | 0 | 0 | 170 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 60 | 0 | 2 | 102 | 318 | 0 | 1 | 160 | 0 | 0.0 | 2 | 1 | 2 | 1 |
| 52 | 1 | 3 | 152 | 298 | 1 | 1 | 178 | 0 | 1.2 | 1 | 0 | 3 | 1 |
| 42 | 0 | 0 | 102 | 265 | 0 | 0 | 122 | 0 | 0.6 | 1 | 0 | 2 | 1 |
| 67 | 0 | 2 | 115 | 564 | 0 | 0 | 160 | 0 | 1.6 | 1 | 0 | 3 | 1 |
| 68 | 1 | 2 | 118 | 277 | 0 | 1 | 151 | 0 | 1.0 | 2 | 1 | 3 | 1 |
| 46 | 1 | 1 | 101 | 197 | 1 | 1 | 156 | 0 | 0.0 | 2 | 0 | 3 | 1 |
| 54 | 0 | 2 | 110 | 214 | 0 | 1 | 158 | 0 | 1.6 | 1 | 0 | 2 | 1 |
| 58 | 0 | 0 | 100 | 248 | 0 | 0 | 122 | 0 | 1.0 | 1 | 0 | 2 | 1 |
| 48 | 1 | 2 | 124 | 255 | 1 | 1 | 175 | 0 | 0.0 | 2 | 2 | 2 | 1 |
| 57 | 1 | 0 | 132 | 207 | 0 | 1 | 168 | 1 | 0.0 | 2 | 0 | 3 | 1 |
| 52 | 1 | 2 | 138 | 223 | 0 | 1 | 169 | 0 | 0.0 | 2 | 4 | 2 | 1 |
| 54 | 0 | 1 | 132 | 288 | 1 | 0 | 159 | 1 | 0.0 | 2 | 1 | 2 | 1 |
| 45 | 0 | 1 | 112 | 160 | 0 | 1 | 138 | 0 | 0.0 | 1 | 0 | 2 | 1 |
| 53 | 1 | 0 | 142 | 226 | 0 | 0 | 111 | 1 | 0.0 | 2 | 0 | 3 | 1 |
| 62 | 0 | 0 | 140 | 394 | 0 | 0 | 157 | 0 | 1.2 | 1 | 0 | 2 | 1 |
| 52 | 1 | 0 | 108 | 233 | 1 | 1 | 147 | 0 | 0.1 | 2 | 3 | 3 | 1 |
| 43 | 1 | 2 | 130 | 315 | 0 | 1 | 162 | 0 | 1.9 | 2 | 1 | 2 | 1 |
| 53 | 1 | 2 | 130 | 246 | 1 | 0 | 173 | 0 | 0.0 | 2 | 3 | 2 | 1 |
| 42 | 1 | 3 | 148 | 244 | 0 | 0 | 178 | 0 | 0.8 | 2 | 2 | 2 | 1 |
| 59 | 1 | 3 | 178 | 270 | 0 | 0 | 145 | 0 | 4.2 | 0 | 0 | 3 | 1 |
| 63 | 0 | 1 | 140 | 195 | 0 | 1 | 179 | 0 | 0.0 | 2 | 2 | 2 | 1 |
| 42 | 1 | 2 | 120 | 240 | 1 | 1 | 194 | 0 | 0.8 | 0 | 0 | 3 | 1 |
| 50 | 1 | 2 | 129 | 196 | 0 | 1 | 163 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 68 | 0 | 2 | 120 | 211 | 0 | 0 | 115 | 0 | 1.5 | 1 | 0 | 2 | 1 |
| 69 | 1 | 3 | 160 | 234 | 1 | 0 | 131 | 0 | 0.1 | 1 | 1 | 2 | 1 |
| 45 | 0 | 0 | 138 | 236 | 0 | 0 | 152 | 1 | 0.2 | 1 | 0 | 2 | 1 |
| 50 | 0 | 1 | 120 | 244 | 0 | 1 | 162 | 0 | 1.1 | 2 | 0 | 2 | 1 |
| 50 | 0 | 0 | 110 | 254 | 0 | 0 | 159 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 64 | 0 | 0 | 180 | 325 | 0 | 1 | 154 | 1 | 0.0 | 2 | 0 | 2 | 1 |
| 57 | 1 | 2 | 150 | 126 | 1 | 1 | 173 | 0 | 0.2 | 2 | 1 | 3 | 1 |
| 64 | 0 | 2 | 140 | 313 | 0 | 1 | 133 | 0 | 0.2 | 2 | 0 | 3 | 1 |
| 43 | 1 | 0 | 110 | 211 | 0 | 1 | 161 | 0 | 0.0 | 2 | 0 | 3 | 1 |
| 55 | 1 | 1 | 130 | 262 | 0 | 1 | 155 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 37 | 0 | 2 | 120 | 215 | 0 | 1 | 170 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 41 | 1 | 2 | 130 | 214 | 0 | 0 | 168 | 0 | 2.0 | 1 | 0 | 2 | 1 |
| 56 | 1 | 3 | 120 | 193 | 0 | 0 | 162 | 0 | 1.9 | 1 | 0 | 3 | 1 |
| 46 | 0 | 1 | 105 | 204 | 0 | 1 | 172 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 46 | 0 | 0 | 138 | 243 | 0 | 0 | 152 | 1 | 0.0 | 1 | 0 | 2 | 1 |
| 64 | 0 | 0 | 130 | 303 | 0 | 1 | 122 | 0 | 2.0 | 1 | 2 | 2 | 1 |
| 59 | 1 | 0 | 138 | 271 | 0 | 0 | 182 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 41 | 0 | 2 | 112 | 268 | 0 | 0 | 172 | 1 | 0.0 | 2 | 0 | 2 | 1 |
| 54 | 0 | 2 | 108 | 267 | 0 | 0 | 167 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 39 | 0 | 2 | 94 | 199 | 0 | 1 | 179 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 34 | 0 | 1 | 118 | 210 | 0 | 1 | 192 | 0 | 0.7 | 2 | 0 | 2 | 1 |
| 47 | 1 | 0 | 112 | 204 | 0 | 1 | 143 | 0 | 0.1 | 2 | 0 | 2 | 1 |
| 67 | 0 | 2 | 152 | 277 | 0 | 1 | 172 | 0 | 0.0 | 2 | 1 | 2 | 1 |
| 52 | 0 | 2 | 136 | 196 | 0 | 0 | 169 | 0 | 0.1 | 1 | 0 | 2 | 1 |
| 74 | 0 | 1 | 120 | 269 | 0 | 0 | 121 | 1 | 0.2 | 2 | 1 | 2 | 1 |
| 54 | 0 | 2 | 160 | 201 | 0 | 1 | 163 | 0 | 0.0 | 2 | 1 | 2 | 1 |
| 49 | 0 | 1 | 134 | 271 | 0 | 1 | 162 | 0 | 0.0 | 1 | 0 | 2 | 1 |
| 42 | 1 | 1 | 120 | 295 | 0 | 1 | 162 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 41 | 1 | 1 | 110 | 235 | 0 | 1 | 153 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 41 | 0 | 1 | 126 | 306 | 0 | 1 | 163 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 49 | 0 | 0 | 130 | 269 | 0 | 1 | 163 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 60 | 0 | 2 | 120 | 178 | 1 | 1 | 96 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 62 | 1 | 1 | 128 | 208 | 1 | 0 | 140 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 57 | 1 | 0 | 110 | 201 | 0 | 1 | 126 | 1 | 1.5 | 1 | 0 | 1 | 1 |
| 64 | 1 | 0 | 128 | 263 | 0 | 1 | 105 | 1 | 0.2 | 1 | 1 | 3 | 1 |
| 51 | 0 | 2 | 120 | 295 | 0 | 0 | 157 | 0 | 0.6 | 2 | 0 | 2 | 1 |
| 43 | 1 | 0 | 115 | 303 | 0 | 1 | 181 | 0 | 1.2 | 1 | 0 | 2 | 1 |
| 42 | 0 | 2 | 120 | 209 | 0 | 1 | 173 | 0 | 0.0 | 1 | 0 | 2 | 1 |
| 67 | 0 | 0 | 106 | 223 | 0 | 1 | 142 | 0 | 0.3 | 2 | 2 | 2 | 1 |
| 76 | 0 | 2 | 140 | 197 | 0 | 2 | 116 | 0 | 1.1 | 1 | 0 | 2 | 1 |
| 70 | 1 | 1 | 156 | 245 | 0 | 0 | 143 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 44 | 0 | 2 | 118 | 242 | 0 | 1 | 149 | 0 | 0.3 | 1 | 1 | 2 | 1 |
| 60 | 0 | 3 | 150 | 240 | 0 | 1 | 171 | 0 | 0.9 | 2 | 0 | 2 | 1 |
| 44 | 1 | 2 | 120 | 226 | 0 | 1 | 169 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 42 | 1 | 2 | 130 | 180 | 0 | 1 | 150 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 66 | 1 | 0 | 160 | 228 | 0 | 0 | 138 | 0 | 2.3 | 2 | 0 | 1 | 1 |
| 71 | 0 | 0 | 112 | 149 | 0 | 1 | 125 | 0 | 1.6 | 1 | 0 | 2 | 1 |
| 64 | 1 | 3 | 170 | 227 | 0 | 0 | 155 | 0 | 0.6 | 1 | 0 | 3 | 1 |
| 66 | 0 | 2 | 146 | 278 | 0 | 0 | 152 | 0 | 0.0 | 1 | 1 | 2 | 1 |
| 39 | 0 | 2 | 138 | 220 | 0 | 1 | 152 | 0 | 0.0 | 1 | 0 | 2 | 1 |
| 58 | 0 | 0 | 130 | 197 | 0 | 1 | 131 | 0 | 0.6 | 1 | 0 | 2 | 1 |
| 47 | 1 | 2 | 130 | 253 | 0 | 1 | 179 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 35 | 1 | 1 | 122 | 192 | 0 | 1 | 174 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 58 | 1 | 1 | 125 | 220 | 0 | 1 | 144 | 0 | 0.4 | 1 | 4 | 3 | 1 |
| 56 | 1 | 1 | 130 | 221 | 0 | 0 | 163 | 0 | 0.0 | 2 | 0 | 3 | 1 |
| 56 | 1 | 1 | 120 | 240 | 0 | 1 | 169 | 0 | 0.0 | 0 | 0 | 2 | 1 |
| 55 | 0 | 1 | 132 | 342 | 0 | 1 | 166 | 0 | 1.2 | 2 | 0 | 2 | 1 |
| 41 | 1 | 1 | 120 | 157 | 0 | 1 | 182 | 0 | 0.0 | 2 | 0 | 2 | 1 |
| 38 | 1 | 2 | 138 | 175 | 0 | 1 | 173 | 0 | 0.0 | 2 | 4 | 2 | 1 |
| 38 | 1 | 2 | 138 | 175 | 0 | 1 | 173 | 0 | 0.0 | 2 | 4 | 2 | 1 |
| 67 | 1 | 0 | 160 | 286 | 0 | 0 | 108 | 1 | 1.5 | 1 | 3 | 2 | 0 |
| 67 | 1 | 0 | 120 | 229 | 0 | 0 | 129 | 1 | 2.6 | 1 | 2 | 3 | 0 |
| 62 | 0 | 0 | 140 | 268 | 0 | 0 | 160 | 0 | 3.6 | 0 | 2 | 2 | 0 |
| 63 | 1 | 0 | 130 | 254 | 0 | 0 | 147 | 0 | 1.4 | 1 | 1 | 3 | 0 |
| 53 | 1 | 0 | 140 | 203 | 1 | 0 | 155 | 1 | 3.1 | 0 | 0 | 3 | 0 |
| 56 | 1 | 2 | 130 | 256 | 1 | 0 | 142 | 1 | 0.6 | 1 | 1 | 1 | 0 |
| 48 | 1 | 1 | 110 | 229 | 0 | 1 | 168 | 0 | 1.0 | 0 | 0 | 3 | 0 |
| 58 | 1 | 1 | 120 | 284 | 0 | 0 | 160 | 0 | 1.8 | 1 | 0 | 2 | 0 |
| 58 | 1 | 2 | 132 | 224 | 0 | 0 | 173 | 0 | 3.2 | 2 | 2 | 3 | 0 |
| 60 | 1 | 0 | 130 | 206 | 0 | 0 | 132 | 1 | 2.4 | 1 | 2 | 3 | 0 |
| 40 | 1 | 0 | 110 | 167 | 0 | 0 | 114 | 1 | 2.0 | 1 | 0 | 3 | 0 |
| 60 | 1 | 0 | 117 | 230 | 1 | 1 | 160 | 1 | 1.4 | 2 | 2 | 3 | 0 |
| 64 | 1 | 2 | 140 | 335 | 0 | 1 | 158 | 0 | 0.0 | 2 | 0 | 2 | 0 |
| 43 | 1 | 0 | 120 | 177 | 0 | 0 | 120 | 1 | 2.5 | 1 | 0 | 3 | 0 |
| 57 | 1 | 0 | 150 | 276 | 0 | 0 | 112 | 1 | 0.6 | 1 | 1 | 1 | 0 |
| 55 | 1 | 0 | 132 | 353 | 0 | 1 | 132 | 1 | 1.2 | 1 | 1 | 3 | 0 |
| 65 | 0 | 0 | 150 | 225 | 0 | 0 | 114 | 0 | 1.0 | 1 | 3 | 3 | 0 |
| 61 | 0 | 0 | 130 | 330 | 0 | 0 | 169 | 0 | 0.0 | 2 | 0 | 2 | 0 |
| 58 | 1 | 2 | 112 | 230 | 0 | 0 | 165 | 0 | 2.5 | 1 | 1 | 3 | 0 |
| 50 | 1 | 0 | 150 | 243 | 0 | 0 | 128 | 0 | 2.6 | 1 | 0 | 3 | 0 |
| 44 | 1 | 0 | 112 | 290 | 0 | 0 | 153 | 0 | 0.0 | 2 | 1 | 2 | 0 |
| 60 | 1 | 0 | 130 | 253 | 0 | 1 | 144 | 1 | 1.4 | 2 | 1 | 3 | 0 |
| 54 | 1 | 0 | 124 | 266 | 0 | 0 | 109 | 1 | 2.2 | 1 | 1 | 3 | 0 |
| 50 | 1 | 2 | 140 | 233 | 0 | 1 | 163 | 0 | 0.6 | 1 | 1 | 3 | 0 |
| 41 | 1 | 0 | 110 | 172 | 0 | 0 | 158 | 0 | 0.0 | 2 | 0 | 3 | 0 |
| 51 | 0 | 0 | 130 | 305 | 0 | 1 | 142 | 1 | 1.2 | 1 | 0 | 3 | 0 |
| 58 | 1 | 0 | 128 | 216 | 0 | 0 | 131 | 1 | 2.2 | 1 | 3 | 3 | 0 |
| 54 | 1 | 0 | 120 | 188 | 0 | 1 | 113 | 0 | 1.4 | 1 | 1 | 3 | 0 |
| 60 | 1 | 0 | 145 | 282 | 0 | 0 | 142 | 1 | 2.8 | 1 | 2 | 3 | 0 |
| 60 | 1 | 2 | 140 | 185 | 0 | 0 | 155 | 0 | 3.0 | 1 | 0 | 2 | 0 |
| 59 | 1 | 0 | 170 | 326 | 0 | 0 | 140 | 1 | 3.4 | 0 | 0 | 3 | 0 |
| 46 | 1 | 2 | 150 | 231 | 0 | 1 | 147 | 0 | 3.6 | 1 | 0 | 2 | 0 |
| 67 | 1 | 0 | 125 | 254 | 1 | 1 | 163 | 0 | 0.2 | 1 | 2 | 3 | 0 |
| 62 | 1 | 0 | 120 | 267 | 0 | 1 | 99 | 1 | 1.8 | 1 | 2 | 3 | 0 |
| 65 | 1 | 0 | 110 | 248 | 0 | 0 | 158 | 0 | 0.6 | 2 | 2 | 1 | 0 |
| 44 | 1 | 0 | 110 | 197 | 0 | 0 | 177 | 0 | 0.0 | 2 | 1 | 2 | 0 |
| 60 | 1 | 0 | 125 | 258 | 0 | 0 | 141 | 1 | 2.8 | 1 | 1 | 3 | 0 |
| 58 | 1 | 0 | 150 | 270 | 0 | 0 | 111 | 1 | 0.8 | 2 | 0 | 3 | 0 |
| 68 | 1 | 2 | 180 | 274 | 1 | 0 | 150 | 1 | 1.6 | 1 | 0 | 3 | 0 |
| 62 | 0 | 0 | 160 | 164 | 0 | 0 | 145 | 0 | 6.2 | 0 | 3 | 3 | 0 |
| 52 | 1 | 0 | 128 | 255 | 0 | 1 | 161 | 1 | 0.0 | 2 | 1 | 3 | 0 |
| 59 | 1 | 0 | 110 | 239 | 0 | 0 | 142 | 1 | 1.2 | 1 | 1 | 3 | 0 |
| 60 | 0 | 0 | 150 | 258 | 0 | 0 | 157 | 0 | 2.6 | 1 | 2 | 3 | 0 |
| 49 | 1 | 2 | 120 | 188 | 0 | 1 | 139 | 0 | 2.0 | 1 | 3 | 3 | 0 |
| 59 | 1 | 0 | 140 | 177 | 0 | 1 | 162 | 1 | 0.0 | 2 | 1 | 3 | 0 |
| 57 | 1 | 2 | 128 | 229 | 0 | 0 | 150 | 0 | 0.4 | 1 | 1 | 3 | 0 |
| 61 | 1 | 0 | 120 | 260 | 0 | 1 | 140 | 1 | 3.6 | 1 | 1 | 3 | 0 |
| 39 | 1 | 0 | 118 | 219 | 0 | 1 | 140 | 0 | 1.2 | 1 | 0 | 3 | 0 |
| 61 | 0 | 0 | 145 | 307 | 0 | 0 | 146 | 1 | 1.0 | 1 | 0 | 3 | 0 |
| 56 | 1 | 0 | 125 | 249 | 1 | 0 | 144 | 1 | 1.2 | 1 | 1 | 2 | 0 |
| 43 | 0 | 0 | 132 | 341 | 1 | 0 | 136 | 1 | 3.0 | 1 | 0 | 3 | 0 |
| 62 | 0 | 2 | 130 | 263 | 0 | 1 | 97 | 0 | 1.2 | 1 | 1 | 3 | 0 |
| 63 | 1 | 0 | 130 | 330 | 1 | 0 | 132 | 1 | 1.8 | 2 | 3 | 3 | 0 |
| 65 | 1 | 0 | 135 | 254 | 0 | 0 | 127 | 0 | 2.8 | 1 | 1 | 3 | 0 |
| 48 | 1 | 0 | 130 | 256 | 1 | 0 | 150 | 1 | 0.0 | 2 | 2 | 3 | 0 |
| 63 | 0 | 0 | 150 | 407 | 0 | 0 | 154 | 0 | 4.0 | 1 | 3 | 3 | 0 |
| 55 | 1 | 0 | 140 | 217 | 0 | 1 | 111 | 1 | 5.6 | 0 | 0 | 3 | 0 |
| 65 | 1 | 3 | 138 | 282 | 1 | 0 | 174 | 0 | 1.4 | 1 | 1 | 2 | 0 |
| 56 | 0 | 0 | 200 | 288 | 1 | 0 | 133 | 1 | 4.0 | 0 | 2 | 3 | 0 |
| 54 | 1 | 0 | 110 | 239 | 0 | 1 | 126 | 1 | 2.8 | 1 | 1 | 3 | 0 |
| 70 | 1 | 0 | 145 | 174 | 0 | 1 | 125 | 1 | 2.6 | 0 | 0 | 3 | 0 |
| 62 | 1 | 1 | 120 | 281 | 0 | 0 | 103 | 0 | 1.4 | 1 | 1 | 3 | 0 |
| 35 | 1 | 0 | 120 | 198 | 0 | 1 | 130 | 1 | 1.6 | 1 | 0 | 3 | 0 |
| 59 | 1 | 3 | 170 | 288 | 0 | 0 | 159 | 0 | 0.2 | 1 | 0 | 3 | 0 |
| 64 | 1 | 2 | 125 | 309 | 0 | 1 | 131 | 1 | 1.8 | 1 | 0 | 3 | 0 |
| 47 | 1 | 2 | 108 | 243 | 0 | 1 | 152 | 0 | 0.0 | 2 | 0 | 2 | 0 |
| 57 | 1 | 0 | 165 | 289 | 1 | 0 | 124 | 0 | 1.0 | 1 | 3 | 3 | 0 |
| 55 | 1 | 0 | 160 | 289 | 0 | 0 | 145 | 1 | 0.8 | 1 | 1 | 3 | 0 |
| 64 | 1 | 0 | 120 | 246 | 0 | 0 | 96 | 1 | 2.2 | 0 | 1 | 2 | 0 |
| 70 | 1 | 0 | 130 | 322 | 0 | 0 | 109 | 0 | 2.4 | 1 | 3 | 2 | 0 |
| 51 | 1 | 0 | 140 | 299 | 0 | 1 | 173 | 1 | 1.6 | 2 | 0 | 3 | 0 |
| 58 | 1 | 0 | 125 | 300 | 0 | 0 | 171 | 0 | 0.0 | 2 | 2 | 3 | 0 |
| 60 | 1 | 0 | 140 | 293 | 0 | 0 | 170 | 0 | 1.2 | 1 | 2 | 3 | 0 |
| 77 | 1 | 0 | 125 | 304 | 0 | 0 | 162 | 1 | 0.0 | 2 | 3 | 2 | 0 |
| 35 | 1 | 0 | 126 | 282 | 0 | 0 | 156 | 1 | 0.0 | 2 | 0 | 3 | 0 |
| 70 | 1 | 2 | 160 | 269 | 0 | 1 | 112 | 1 | 2.9 | 1 | 1 | 3 | 0 |
| 59 | 0 | 0 | 174 | 249 | 0 | 1 | 143 | 1 | 0.0 | 1 | 0 | 2 | 0 |
| 64 | 1 | 0 | 145 | 212 | 0 | 0 | 132 | 0 | 2.0 | 1 | 2 | 1 | 0 |
| 57 | 1 | 0 | 152 | 274 | 0 | 1 | 88 | 1 | 1.2 | 1 | 1 | 3 | 0 |
| 56 | 1 | 0 | 132 | 184 | 0 | 0 | 105 | 1 | 2.1 | 1 | 1 | 1 | 0 |
| 48 | 1 | 0 | 124 | 274 | 0 | 0 | 166 | 0 | 0.5 | 1 | 0 | 3 | 0 |
| 56 | 0 | 0 | 134 | 409 | 0 | 0 | 150 | 1 | 1.9 | 1 | 2 | 3 | 0 |
| 66 | 1 | 1 | 160 | 246 | 0 | 1 | 120 | 1 | 0.0 | 1 | 3 | 1 | 0 |
| 54 | 1 | 1 | 192 | 283 | 0 | 0 | 195 | 0 | 0.0 | 2 | 1 | 3 | 0 |
| 69 | 1 | 2 | 140 | 254 | 0 | 0 | 146 | 0 | 2.0 | 1 | 3 | 3 | 0 |
| 51 | 1 | 0 | 140 | 298 | 0 | 1 | 122 | 1 | 4.2 | 1 | 3 | 3 | 0 |
| 43 | 1 | 0 | 132 | 247 | 1 | 0 | 143 | 1 | 0.1 | 1 | 4 | 3 | 0 |
| 62 | 0 | 0 | 138 | 294 | 1 | 1 | 106 | 0 | 1.9 | 1 | 3 | 2 | 0 |
| 67 | 1 | 0 | 100 | 299 | 0 | 0 | 125 | 1 | 0.9 | 1 | 2 | 2 | 0 |
| 59 | 1 | 3 | 160 | 273 | 0 | 0 | 125 | 0 | 0.0 | 2 | 0 | 2 | 0 |
| 45 | 1 | 0 | 142 | 309 | 0 | 0 | 147 | 1 | 0.0 | 1 | 3 | 3 | 0 |
| 58 | 1 | 0 | 128 | 259 | 0 | 0 | 130 | 1 | 3.0 | 1 | 2 | 3 | 0 |
| 50 | 1 | 0 | 144 | 200 | 0 | 0 | 126 | 1 | 0.9 | 1 | 0 | 3 | 0 |
| 62 | 0 | 0 | 150 | 244 | 0 | 1 | 154 | 1 | 1.4 | 1 | 0 | 2 | 0 |
| 38 | 1 | 3 | 120 | 231 | 0 | 1 | 182 | 1 | 3.8 | 1 | 0 | 3 | 0 |
| 66 | 0 | 0 | 178 | 228 | 1 | 1 | 165 | 1 | 1.0 | 1 | 2 | 3 | 0 |
| 52 | 1 | 0 | 112 | 230 | 0 | 1 | 160 | 0 | 0.0 | 2 | 1 | 2 | 0 |
| 53 | 1 | 0 | 123 | 282 | 0 | 1 | 95 | 1 | 2.0 | 1 | 2 | 3 | 0 |
| 63 | 0 | 0 | 108 | 269 | 0 | 1 | 169 | 1 | 1.8 | 1 | 2 | 2 | 0 |
| 54 | 1 | 0 | 110 | 206 | 0 | 0 | 108 | 1 | 0.0 | 1 | 1 | 2 | 0 |
| 66 | 1 | 0 | 112 | 212 | 0 | 0 | 132 | 1 | 0.1 | 2 | 1 | 2 | 0 |
| 55 | 0 | 0 | 180 | 327 | 0 | 2 | 117 | 1 | 3.4 | 1 | 0 | 2 | 0 |
| 49 | 1 | 2 | 118 | 149 | 0 | 0 | 126 | 0 | 0.8 | 2 | 3 | 2 | 0 |
| 54 | 1 | 0 | 122 | 286 | 0 | 0 | 116 | 1 | 3.2 | 1 | 2 | 2 | 0 |
| 56 | 1 | 0 | 130 | 283 | 1 | 0 | 103 | 1 | 1.6 | 0 | 0 | 3 | 0 |
| 46 | 1 | 0 | 120 | 249 | 0 | 0 | 144 | 0 | 0.8 | 2 | 0 | 3 | 0 |
| 61 | 1 | 3 | 134 | 234 | 0 | 1 | 145 | 0 | 2.6 | 1 | 2 | 2 | 0 |
| 67 | 1 | 0 | 120 | 237 | 0 | 1 | 71 | 0 | 1.0 | 1 | 0 | 2 | 0 |
| 58 | 1 | 0 | 100 | 234 | 0 | 1 | 156 | 0 | 0.1 | 2 | 1 | 3 | 0 |
| 47 | 1 | 0 | 110 | 275 | 0 | 0 | 118 | 1 | 1.0 | 1 | 1 | 2 | 0 |
| 52 | 1 | 0 | 125 | 212 | 0 | 1 | 168 | 0 | 1.0 | 2 | 2 | 3 | 0 |
| 58 | 1 | 0 | 146 | 218 | 0 | 1 | 105 | 0 | 2.0 | 1 | 1 | 3 | 0 |
| 57 | 1 | 1 | 124 | 261 | 0 | 1 | 141 | 0 | 0.3 | 2 | 0 | 3 | 0 |
| 58 | 0 | 1 | 136 | 319 | 1 | 0 | 152 | 0 | 0.0 | 2 | 2 | 2 | 0 |
| 61 | 1 | 0 | 138 | 166 | 0 | 0 | 125 | 1 | 3.6 | 1 | 1 | 2 | 0 |
| 42 | 1 | 0 | 136 | 315 | 0 | 1 | 125 | 1 | 1.8 | 1 | 0 | 1 | 0 |
| 52 | 1 | 0 | 128 | 204 | 1 | 1 | 156 | 1 | 1.0 | 1 | 0 | 0 | 0 |
| 59 | 1 | 2 | 126 | 218 | 1 | 1 | 134 | 0 | 2.2 | 1 | 1 | 1 | 0 |
| 40 | 1 | 0 | 152 | 223 | 0 | 1 | 181 | 0 | 0.0 | 2 | 0 | 3 | 0 |
| 61 | 1 | 0 | 140 | 207 | 0 | 0 | 138 | 1 | 1.9 | 2 | 1 | 3 | 0 |
| 46 | 1 | 0 | 140 | 311 | 0 | 1 | 120 | 1 | 1.8 | 1 | 2 | 3 | 0 |
| 59 | 1 | 3 | 134 | 204 | 0 | 1 | 162 | 0 | 0.8 | 2 | 2 | 2 | 0 |
| 57 | 1 | 1 | 154 | 232 | 0 | 0 | 164 | 0 | 0.0 | 2 | 1 | 2 | 0 |
| 57 | 1 | 0 | 110 | 335 | 0 | 1 | 143 | 1 | 3.0 | 1 | 1 | 3 | 0 |
| 55 | 0 | 0 | 128 | 205 | 0 | 2 | 130 | 1 | 2.0 | 1 | 1 | 3 | 0 |
| 61 | 1 | 0 | 148 | 203 | 0 | 1 | 161 | 0 | 0.0 | 2 | 1 | 3 | 0 |
| 58 | 1 | 0 | 114 | 318 | 0 | 2 | 140 | 0 | 4.4 | 0 | 3 | 1 | 0 |
| 58 | 0 | 0 | 170 | 225 | 1 | 0 | 146 | 1 | 2.8 | 1 | 2 | 1 | 0 |
| 67 | 1 | 2 | 152 | 212 | 0 | 0 | 150 | 0 | 0.8 | 1 | 0 | 3 | 0 |
| 44 | 1 | 0 | 120 | 169 | 0 | 1 | 144 | 1 | 2.8 | 0 | 0 | 1 | 0 |
| 63 | 1 | 0 | 140 | 187 | 0 | 0 | 144 | 1 | 4.0 | 2 | 2 | 3 | 0 |
| 63 | 0 | 0 | 124 | 197 | 0 | 1 | 136 | 1 | 0.0 | 1 | 0 | 2 | 0 |
| 59 | 1 | 0 | 164 | 176 | 1 | 0 | 90 | 0 | 1.0 | 1 | 2 | 1 | 0 |
| 57 | 0 | 0 | 140 | 241 | 0 | 1 | 123 | 1 | 0.2 | 1 | 0 | 3 | 0 |
| 45 | 1 | 3 | 110 | 264 | 0 | 1 | 132 | 0 | 1.2 | 1 | 0 | 3 | 0 |
| 68 | 1 | 0 | 144 | 193 | 1 | 1 | 141 | 0 | 3.4 | 1 | 2 | 3 | 0 |
| 57 | 1 | 0 | 130 | 131 | 0 | 1 | 115 | 1 | 1.2 | 1 | 1 | 3 | 0 |
| 57 | 0 | 1 | 130 | 236 | 0 | 0 | 174 | 0 | 0.0 | 1 | 1 | 2 | 0 |
Including Plots
You can also embed plots, for example:
heart %>% mutate(IdadeCat = if_else(age <= 51, 0,
if_else(age <= 59, 1, 2)),
IdadeCat = factor(IdadeCat,
levels = c(0,1,2),
labels = c("I<=51", "51<I<=59", "I> 59"),
ordered = TRUE),
DorNoPeito = cp > 0) %>%
ggplot() + geom_boxplot(aes(x = factor(target),
y = chol, fill = IdadeCat)) +
geom_jitter(aes(x = factor(target),
y = chol, fill = IdadeCat)) Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.
heart %>% ggplot() + geom_histogram(aes(x = age), binwidth = 5, color = "blue", fill = "blue", alpha = .5) + xlab("Idade")+ylab("NĂºmero de Obs") + ggtitle("Histograma de Idades", subtitle = "Meu primeiro histograma") heart %>% ggplot() + geom_histogram(aes(x = age, fill = factor(target, levels = c(0,1), labels = c("NĂ£o", "Sim"))), binwidth = 5) + labs(fill = "Doente", x = "Idade", y = "N. Obs")heart %>% ggplot() + geom_histogram(aes(x = age, fill = factor(target, levels = c(0,1), labels = c("NĂ£o", "Sim"))), binwidth = 5, position = "dodge") + labs(fill = "Doente", x = "Idade", y = "N. Obs")heart %>% ggplot() + geom_histogram(aes(x = age), binwidth = 5, position = "dodge") + labs(x = "Idade", y = "N. Obs")heart %>% ggplot() + geom_histogram(aes(x = age), binwidth = 5, position = "dodge", color = "blue", fill = "blue", alpha = .5) + labs(x = "Idade", y = "N. Obs") + facet_wrap(.~factor(target))heart %>% ggplot() + geom_histogram(aes(x = age, fill = factor(target), color = factor(target)), binwidth = 5, alpha = .25) + labs(x = "Idade", y = "N. Obs") + facet_wrap(.~factor(target)) + guides(fill = "none", color = "none")heart %>% ggplot() + geom_density(aes(x = age, fill = factor(target), color = factor(target)), binwidth = 5, alpha = .25) + labs(x = "Idade", y = "N. Obs") + facet_wrap(.~factor(target)) + guides(fill = "none", color = "none")## Warning: Ignoring unknown parameters: binwidth
heart %>% ggplot() + geom_density(aes(x = age, fill = factor(target), color = factor(target)), alpha = .25) + labs(x = "Idade", y = "N. Obs", fill = "Doente", color = "Doente")heart %>% ggplot() + geom_bar(aes(x = sex)) heart %>% mutate(sex = if_else(sex == 0, "feminino", if_else(sex == 1, "masculino", "erro"))) %>% ggplot() + geom_bar(aes(x = sex))Stay Tuned
Please visit the development page of the prettydoc package for latest updates and news. Comments, bug reports and pull requests are always welcome.