Dear all,

I was reading for the nice ... parameter option in R, which if I got it right 
it is used to pass other parameter to some other function inside your function

for example


plot_duty_cycle<- function(data, ...) {
             barplot(duty_cycle_per_bin(data), ...)
}

I can put some parameters to pass inside the barplot function inside my 
function.


I would like to ask you if there is a "smart" way to also put some parameter in 
the input section of my function so to also save the plot in the given path

I am thinking for something like that

plot_duty_cycle<- function(data, ...) {
             barplot(duty_cycle_per_bin(data), ...)
       if (is(path) { save somehow the plot in the path}
}


Could you please give me a nice hint for that case

B.R
Alex
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to