r'
for (\i in \iter) {
  \x[[\i]] <- \expr
}
': r'{
y <- as.list(\x)

for (\i in \iter) {
  y[[\i]] <- \expr
}

\x <- as.data.frame(y)
}';