I'm trying to plot using lattice's level plot for spatial data from a dataframe, column named as x, y, z, for example. With the levelplot function, I think it only accepts column names as formula input, not index. I wonder if I can use the column index for formula input.
levelplot(z ~ x*y,df)
can I use column index, such as
levelplot(3 ~x*y, df)
or
levelplot(3 ~1*2, df)