I've written a macro in imageJ that spits out a data frame which I then analyze in R. I'd love to be able to have the whole procedure work in R without having to first run the macro manually in imageJ. Currently the macro prompts the user for the input and output directories and then does it's thing. I'm thinking there must be a function in R that will allow me to specify the macro and the input and output directories (I could then recode these variables in the macro to somehow take these arguments through the R script?)
I gather that I can use the system() command and found this tantalizing clue from somewhere else on the web:
system("./JavaApplicationStub directory file[i] -batch zmacro")
but I am not sure how to implement this (my macro already utilizes batch processing so that part would be unnecessary).
eval
argument. – Protohumaneval
argument where? (thanks for helping, by the way). – Abduction-eval"macrocode" Evaluates macro code. Examples:
– Protohumansystem
, which just runs something at the command line. The link I pointed to shows how to run imageJ at the command line. – Protohuman