Looping Over Two Variables (indexes) in a DataFrame

Hello Everyone,

I am running a simulation study looping (for loop) over two indexes. In R we can do this::
for i in 1:100{
for j in c(15, 30, 50, 400){
df1$result[df1$snum==i & df1$szise==j]<-dosomething[df2$snum=i & df2$szise==j]
}
}
I am trying to get this to work in Julia; any suggestions?

What have you tried so far? This should be pretty easy to translate into Julia. Start by replacing the $ with . and the {...} with begin...end

1 Like