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.

02-types_data.Rmd 1.2KB

5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ---
  2. title: "Types de datasets et types de données"
  3. author: "Antoine Neuraz"
  4. date: "10/30/2019"
  5. output:
  6. bookdown::html_document2:
  7. code_folding: hide
  8. ---
  9. # Types de datasets et types de données
  10. ## Types de datasets
  11. ### Données tabulaires
  12. ```{r}
  13. dt <- data.frame(x = rep(1:5, 3),
  14. y = c(rep(1,5), rep(2,5),rep(3,5)),
  15. group = rep(1, 5*3))
  16. dt$group[8] <- 2
  17. ggplot(data = dt,
  18. mapping = aes(x = x, y = y, fill = as.factor(group))) +
  19. geom_tile(color = 'white', size = 2) +
  20. annotate("segment", x=0.2,xend=5,y=3.8,yend=3.8,arrow=arrow(type="closed",length= unit(.4,"cm"))) +
  21. annotate("segment", x=0.2,xend=0.2,y=3.8,yend=1,arrow=arrow(type="closed",length= unit(.4,"cm"))) +
  22. annotate("text", x=3, y=0, label = "Cellule contenant une valeur",hjust=0.5) +
  23. annotate("segment", x=3,xend=3,y=0.2,yend=1.5,arrow=arrow(type="closed", length= unit(.4,"cm"))) +
  24. scale_fill_manual(values = list("lightgrey", "darkred"))+
  25. scale_x_continuous(position = "top")+
  26. xlab('Attributs (colonnes)') +
  27. ylab('Items (lignes)') +
  28. theme_modern() +
  29. theme(legend.position = 'none',
  30. axis.text=element_blank(),
  31. axis.line =element_blank())
  32. ```
  33. ### TODO
  34. ## Types de données
  35. ### TODO