Skip to content
Prev 189 / 197 Next

[OGRUG] Newbie needs help with plot

Hi Martin,

It helps if you show us what it was you tried to do, and exactly what
your errors were. The closer you can make your code sample to being
reproducible, the easier it is for others to see where you went wrong.
You can even attach your data file if that might be related to your
problem.
having is how to reference the variables (i.e. columns) inside the
data.frame object that you imported (I'm assuming you used
`read.csv()` or something similar). If your columns were imported with
the names from the file (here is where seeing your code and having
your data file would help with the answer) you can reference the
individual field use the "$" notation, like:
and you could then make a plot by doing, e.g.
The `with()` function can be handy if you are plotting columns all
from the same data.frame object, and would be used like:
If your columns aren't named, the best thing to do is name them in the
object and then proceed as above. To name columns you can do
Otherwise you can use the "numeric" approach to specifying which
columns you want to plot, e.g.
Hope that helps!

Cheers,
Clark
On Mon, Sep 14, 2020 at 9:04 PM Martin Potter <mpotter at storm.ca> wrote: