R project

Arthur Martins Ferreira de Sousa

Rearranging basic data-set, and testing simple stem and leaf plot

library(dplyr)
library(knitr)
library(latexpdf)
library(tinytex)
rm(list=ls(all=TRUE))
setwd("C:/Users/arthu/OneDrive/Área de Trabalho/R_projects/trabalhos de VED/Databases")
getwd()
data = readxl::read_xlsx("CUSTOBB2011.xlsx")
df = data.frame(time = data$Time, custo = data$`Custo ($)`)
df2 = arrange(df, custo)
kable(df2, caption = "Ascending-order-cost")
Ascending-order-cost
time custo
Arizona 121
San Diego 126
Pittsburgh 128
Los Angeles Angels 130
Tampa Bay 140
Texas 159
Kansas City 160
Florida 160
Milwaukee 160
Colorado 161
Cincinnati 162
Atlanta 169
Cleveland 171
Baltimore 174
Oakland 178
Seattle 184
Washington 196
Detroit 207
San Francisco 208
Toronto 212
Minnesota 213
Houston 221
St. Louis 223
Los Angeles Dodgers 226
Philadelphia 241
New York Mets 242
Chicago White Sox 259
Chicago Cubs 306
New York Yankees 338
Boston 339
graphics::stem(df2$custo, scale = 3, width = 30)
## 
##   The decimal point is 1 digit(s) to the right of the |
## 
##   12 | 168
##   13 | 0
##   14 | 0
##   15 | 9
##   16 | 000129
##   17 | 148
##   18 | 4
##   19 | 6
##   20 | 78
##   21 | 23
##   22 | 136
##   23 | 
##   24 | 12
##   25 | 9
##   26 | 
##   27 | 
##   28 | 
##   29 | 
##   30 | 6
##   31 | 
##   32 | 
##   33 | 89