Skip to content
Prev 361502 / 398502 Next

How to specify a data frame column using command line arg?

Yes, I see what you want. I can't run this myself as my work computer
runs Windows and insists on starting Statistica when I run an R file
in batch mode. What about:

plot(adl1[,args[1]],adl1[,args[2]])

I just noticed that you are plotting in ggplot, so this won't help. Maybe:

aes(x=args[1], y=args[2])

?

Jim
On Mon, Jun 6, 2016 at 1:29 PM, Douglas Johnson <todojo at gmail.com> wrote: