Introduction

following the coursera class I’m making my first Rmarkdown for this assignment, the instructions are as follow :

* Please complete all the tasks listed below. After completing the tasks download the .Rmd file and upload in the peer review item for grading.

* Additionally please write text between the code chunks explaining what each code chunk is about.

  1. a bulleted list with sub-bullets under at least one item (10 pt)

  2. a numbered list (10 pt)

  3. some words italicized (5 pt)

  4. some words in bold print (5 pt)

  5. two levels of headers (10 pt)

  6. the results of some R code without showing the code (10 pt)

  7. a table of text at least 3 columns wide and 3 rows long (10 pt)

  8. a plot (show the code that generates the plot) (10 pt)

  9. your session info (as output from R) (10 pt)

  10. Execution of .Rmd file (10 pt)

  11. Upload and execution of knitted pdf (10 pt)

Exercise

library(ggplot2)
(cars <- cars)
##    speed dist
## 1      4    2
## 2      4   10
## 3      7    4
## 4      7   22
## 5      8   16
## 6      9   10
## 7     10   18
## 8     10   26
## 9     10   34
## 10    11   17
## 11    11   28
## 12    12   14
## 13    12   20
## 14    12   24
## 15    12   28
## 16    13   26
## 17    13   34
## 18    13   34
## 19    13   46
## 20    14   26
## 21    14   36
## 22    14   60
## 23    14   80
## 24    15   20
## 25    15   26
## 26    15   54
## 27    16   32
## 28    16   40
## 29    17   32
## 30    17   40
## 31    17   50
## 32    18   42
## 33    18   56
## 34    18   76
## 35    18   84
## 36    19   36
## 37    19   46
## 38    19   68
## 39    20   32
## 40    20   48
## 41    20   52
## 42    20   56
## 43    20   64
## 44    22   66
## 45    23   54
## 46    24   70
## 47    24   92
## 48    24   93
## 49    24  120
## 50    25   85

summary formating

symbol formating use
_ italic for instructions
** bold for emphasis
  • third creating a plot
ggplot(data=cars, mapping= aes(speed, dist))+
 geom_point(
    mapping = aes(x = speed, y = dist ),
    colour = 'blue', size = 3
  )

## tidying up

sessionInfo()
## R version 4.0.0 (2020-04-24)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04 LTS
## 
## Matrix products: default
## BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C             
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] ggplot2_3.3.1
## 
## loaded via a namespace (and not attached):
##  [1] knitr_1.28       magrittr_1.5     tidyselect_1.1.0 munsell_0.5.0   
##  [5] colorspace_1.4-1 R6_2.4.1         rlang_0.4.6      stringr_1.4.0   
##  [9] dplyr_1.0.0      tools_4.0.0      grid_4.0.0       gtable_0.3.0    
## [13] xfun_0.14        withr_2.2.0      htmltools_0.5.0  ellipsis_0.3.1  
## [17] yaml_2.2.1       digest_0.6.25    tibble_3.0.1     lifecycle_0.2.0 
## [21] crayon_1.3.4     farver_2.0.3     purrr_0.3.4      vctrs_0.3.1     
## [25] glue_1.4.1       evaluate_0.14    rmarkdown_2.2    labeling_0.3    
## [29] stringi_1.4.6    compiler_4.0.0   pillar_1.4.4     generics_0.0.2  
## [33] scales_1.1.1     pkgconfig_2.0.3