I woud like to understand how levelplot works. I have almost no experience with plots and R.
What confuses me, is how should I interpret for example x~y*z ?
Lets assume I have a function, and I would like to show how often certain value occurs by using 3d plot. I would have hence x = x, y = f(x) and z = count. How to obtain such simple plot by using levelplot (or something else if it is not appriopriate).
In addition, should I group “count” myself – 3 columns in my data from, or just have 2 columns – x and f(x) and have duplications?
Hope my question is clear, I tried to read levelplot documentation, however I could not find any tutorial that teaches basics.
The following example is from the
?levelplotdocumentation.The formula
z~x*ymeans thatzis a function ofx,yand the interaction betweenxandy. Had the function beenz~x+yit would have meant thatzis a function ofxandy, ignoring any interaction.You can read more about the formula interface in the help for
?formula.