Can plotly make "exploding" pie charts in R?

So far, all my searches lead to python tutorials. There aren’t many stack exchange threads about exploding pie charts in plotly, either. I can’t find it on the plotly webpages (for R).

Are you referring to this example?:

If this is the case - sure we can use the pull parameter in R:


USPersonalExpenditure <- data.frame("Categorie"=rownames(USPersonalExpenditure), USPersonalExpenditure)
data <- USPersonalExpenditure[,c('Categorie', 'X1960')]

fig <- plot_ly(data, labels = ~Categorie, values = ~X1960, type = 'pie', pull = c(0, 0, 0.2, 0, 0))
fig <- fig %>% layout(title = 'United States Personal Expenditures by Categories in 1960',
                      xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
                      yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))



The above is a modified version of this example.