R programming function without ()
- by Mark Kennedy
So, I Have the following very simple map.r file.
I'm trying to have the user type "click" in interactive mode and then have the function .
Since it's a function, the user has to type "click()" how can I make it so that they only have to the word (w/o parentheses), and then have that function do something with the img.
So the user types:
mydist("image.pnm")
click
//And then the function click does what it's supposed to
mydist <- function(mapfile) {
img <- read.pnm(mapfile)
plot(img)
}
click <- function() {
//Prompt user to click on img
}