Below is example data and a function (`barplot2`) that I have written. You will notice that `barplot2` only calculates co-ordinates and then uses `polygon` command. For now, I have only specified arguments for `lwd` and `col` in the function which can be passed on to the `polygon` command inside the function. But the `polygon` command is already capable of accepting several `arguments` such as `density`, `border`, `angle`, etc. Is there a proper way to write my function so that I don't have to individually enumerate all those `arguments` and still be able to use them.

```
set.seed(100)
Mydata = rnorm(65)
Year = 1950:2014

plot(Year, Mydata, type = 'p', pch = NA, xlab = "", ylab = "")

barplot2 <- function(x, y, lwd = 1, col = "grey"){
    w = ((max(x) - min(x))/length(x)) * 0.75
    for (i in 1:length(x)){
        x1  = x[i] - w/2
        x2 = x[i] + w/2
        y1 = 0
        y2 = y[i]
        polygon(x = c(x1,x2,x2,x1), y = c(y1,y1,y2,y2), lwd = lwd, col = col)
    }
}
barplot2(Year,Mydata)

```