Black Lives Matter. Please consider donating to Black Girls Code today.

Plotly for R How to save 3 D images programmatically

I am trying to save plotly 3 D plots that I have generated using Plotly for R programmatically (not manually using the plotly tools). I found the examples using Python but not R. Does anyone know?