You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
665 B

  1. ---
  2. title: "using_tidyverse"
  3. author: "Pjotr"
  4. date: "03/03/2020"
  5. output: html_document
  6. ---
  7. ```{r setup, include=FALSE}
  8. knitr::opts_chunk$set(echo = TRUE)
  9. ```
  10. ## R Tidyverse
  11. The new way of analysing R data is the tidyverse https://www.tidyverse.org/ which includes the online book 'R for Data Science'.
  12. Instead of dataframes we use Tibbles now. First import the data - make sure FACTORS is off and tables and columns show.
  13. ```{r}
  14. plot(ind_attr$ELISA ~ ind_attr$Time_to_diagnosis)
  15. ```
  16. we want to turn ind_attr into a tibble with
  17. ```{r}
  18. tb = as_tibble(ind_attr)
  19. tb
  20. ```
  21. ```{r}
  22. ggplot(data = tb) + geom_point(mapping = aes(y=ELISA, x = Time_to_diagnosis))
  23. ```