1 Load data

rawdata <- readr::read_csv("diamonds.csv")   # source("../passwords.R") # never post your passwords to Github again!

2 Processing data

processed_data <- rawdata %>% 
  filter(carat <= 2.5)

2.1 Table of processed data

knitr::kable(
  processed_data[1:3, ], 
  caption = "A knitr kable."
)
carat cut color clarity depth table price x y z
0.23 Ideal E SI2 61.5 55 326 3.95 3.98 2.43
0.21 Premium E SI1 59.8 61 326 3.89 3.84 2.31
0.23 Good E VS1 56.9 65 327 4.05 4.07 2.31

2.2 Plot of processed data

processed_data %>%
  ggplot(aes(carat)) + 
    geom_freqpoly(binwidth = 0.01)


2.3 Session Info

R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Romanian_Romania.1250  LC_CTYPE=Romanian_Romania.1250    LC_MONETARY=Romanian_Romania.1250
[4] LC_NUMERIC=C                      LC_TIME=Romanian_Romania.1250    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] bindrcpp_0.2.2    papaja_0.1.0.9842 psych_1.8.10      forcats_0.3.0     stringr_1.3.1     dplyr_0.7.8       purrr_0.2.5      
 [8] readr_1.3.0       tidyr_0.8.2       tibble_1.4.2      ggplot2_3.1.0     tidyverse_1.2.1   pacman_0.5.0     

loaded via a namespace (and not attached):
 [1] tidyselect_0.2.5 xfun_0.4         haven_2.1.0      lattice_0.20-38  colorspace_1.3-2 generics_0.0.2   htmltools_0.3.6 
 [8] yaml_2.2.0       rlang_0.3.1      pillar_1.3.1     foreign_0.8-71   glue_1.3.0       withr_2.1.2      modelr_0.1.2    
[15] readxl_1.1.0     bindr_0.1.1      plyr_1.8.4       munsell_0.5.0    gtable_0.2.0     cellranger_1.1.0 rvest_0.3.2     
[22] evaluate_0.12    labeling_0.3     knitr_1.21       parallel_3.5.2   highr_0.7        broom_0.5.1      Rcpp_1.0.0      
[29] scales_1.0.0     backports_1.1.3  jsonlite_1.6     mnormt_1.5-5     digest_0.6.18    hms_0.4.2        stringi_1.2.4   
[36] grid_3.5.2       cli_1.0.1        tools_3.5.2      magrittr_1.5     lazyeval_0.2.1   crayon_1.3.4     pkgconfig_2.0.2 
[43] xml2_1.2.0       lubridate_1.7.4  rmarkdown_1.11   assertthat_0.2.0 httr_1.4.0       rstudioapi_0.8   R6_2.3.0        
[50] nlme_3.1-137     compiler_3.5.2  
 

A work by Claudiu Papasteri

claudiu.papasteri@gmail.com

 

LS0tDQp0aXRsZTogIjxicj4gUiBOb3RlYm9vayBUZW1wbGF0ZSIgDQpzdWJ0aXRsZTogIlJNYXJkb3duIFJlcG9ydCINCmF1dGhvcjogIjxicj4gQ2xhdWRpdSBQYXBhc3RlcmkiDQpkYXRlOiAiYHIgZm9ybWF0KFN5cy50aW1lKCksICclZCAlbSAlWScpYCINCm91dHB1dDogDQogICAgaHRtbF9ub3RlYm9vazoNCiAgICAgICAgICAgIGNvZGVfZm9sZGluZzogaGlkZQ0KICAgICAgICAgICAgdG9jOiB0cnVlDQogICAgICAgICAgICB0b2NfZGVwdGg6IDINCiAgICAgICAgICAgIG51bWJlcl9zZWN0aW9uczogdHJ1ZQ0KICAgICAgICAgICAgdGhlbWU6IHNwYWNlbGFiDQogICAgICAgICAgICBoaWdobGlnaHQ6IHRhbmdvDQogICAgICAgICAgICBmb250LWZhbWlseTogQXJpYWwNCiAgICBwZGZfZG9jdW1lbnQ6IA0KICAgICAgICAgICAgdG9jOiB0cnVlDQogICAgICAgICAgICB0b2NfZGVwdGg6IDINCiAgICAgICAgICAgIG51bWJlcl9zZWN0aW9uczogdHJ1ZQ0KICAgICAgICAgICAgIyBmb250c2l6ZTogMTFwdA0KICAgICAgICAgICAgIyBnZW9tZXRyeTogbWFyZ2luPTFpbg0KICAgICAgICAgICAgIyBmaWdfd2lkdGg6IDcNCiAgICAgICAgICAgICMgZmlnX2hlaWdodDogNg0KICAgICAgICAgICAgIyBmaWdfY2FwdGlvbjogdHJ1ZQ0KICAgIC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