title: In R, add a trace in a density plotly
body: <p>Using the plotly package in R, I would like to do a desity plot. Actually, I need to add one more density line in my graph. I have a data with the income information of some public company by geographical region. Something like this</p>
  
  <pre><code>head(data)
  id    income region 
    1     4556     1
    2     6545     1
    3    65465     2
    4    54555     1
    5    71442     2
    6     5645     6
  </code></pre>
  
  <p>In a first moment, I analysed 5 and 6 regions' income with the following density plot </p>
  
  <pre><code>reg56&lt;- data[data$region %in% c(5,6) , ]
  dens &lt;- with(reg56, tapply(income, INDEX = region, density))
  df &lt;- data.frame(
  x = unlist(lapply(dens, "[[", "x")),
  y = unlist(lapply(dens, "[[", "y")),
  cut = rep(names(dens), each = length(dens[[1]]$x))
  )
  
  # plot the density 
  p&lt;- plot_ly(df, x = x, y = y, color = cut) 
  </code></pre>
  
  <p>But, I want more than this. I would like to add the total income, i.e. the income of all regions. I tried something this</p>
  
  <pre><code>data$aux&lt;- 1
  dens2 &lt;- with(data, tapply(income, INDEX = 1, density)) 
  df2 &lt;- data.frame(
   x = unlist(lapply(dens2, "[[", "x")),
   y = unlist(lapply(dens2, "[[", "y")),
   cut = rep(names(dens2), each = length(dens2[[1]]$x)) )
  
  p&lt;- plot_ly(df, x = x, y = y, color = cut) 
  p&lt;-  add_trace(p, df2, x = x, y = y, color = cut)  
  p
  Error in FUN(X[[i]], ...) : 
  'options' must be a fully named list, or have no names (NULL)
  </code></pre>
  
  <p>Some solution for this?</p>