---
title: "CHAP 2 - additional exercises"
author: "Valentine"
date: "30/08/2021"
output: pdf_document
---

## EXO 1



```{r message=FALSE}
library(tidyverse)
library(lattice)
data(barley)
```

```{r}
ggplot(barley,aes(x=variety,y=yield)) + geom_point()
```

## EXO 2 

```{r eval=FALSE}
plot_probe_sets <- function(x, y, data) {
  if(all(x,y) %in% colnames(data[1:6])) {
    z <- plot(data[,x], data[,y])
  } else {
    z <- message("Error : probe sets are not valid")
  }
  return(z)
}

plot_probe_sets("X1426642_at", "X1418765_at", hiiragi2013df1)
```

doesn't work  
error : coercing argument of type 'character' to logical
