I was trying to plot dynamic graph in different panels as it could be done on the website using `group` such as [![enter image description here](https://i.stack.imgur.com/fslFa.png)](https://i.stack.imgur.com/fslFa.png)

but it should be dynamic using dygraphs. An example code here:

```
library(quantmod)
library(dygraphs)
data(edhec)
R = edhec[, 1:4]
dygraph(R)

```

Many thanks in advance.