Create Many Traces: Translating Python Loop to R

I am trying to figure out how to create many separate traces at once in R Plotly like I can do in Python.

Here is a working Python example which works well in many situations:

import pandas as pd
import plotly
import plotly.graph_objs as go

mtcars = pd.read_csv('https://gist.githubusercontent.com/seankross/a412dfbd88b3db70b74b/raw/5f23f993cd87c283ce766e7ac6b329ee7cc2e1d1/mtcars.csv')

container = []
for i, j in mtcars.groupby('model'):
trace = (go.Scatter(x=j.carb, y=j.mpg, showlegend=True, 
                    name = i))
container.append(trace)

fig = dict(data=container)
plotly.offline.plot(fig, validate=False) # offline plotting

My attempt in R is not producing the same results;

mtcars = read.csv('https://gist.githubusercontent.com/seankross/a412dfbd88b3db70b74b/raw/5f23f993cd87c283ce766e7ac6b329ee7cc2e1d1/mtcars.csv')

p <- plot_ly(type = 'scatter', mode = 'markers')
for(i in unique(mtcars$model)) {
    p <- add_trace(p, x = ~mtcars$carb, y = ~mtcars$mpg, name = ~mtcars$model)
}
p

TLDR: Looking to generate many independent traces akin to Python in R