I am trying to print many plots to a PDF-file in R. The thing is, that there are more than 3k plots to print and I want to know, what plot is being processed now. My code looks like this:

```
pdf("plots.pdf", onefile = TRUE)

for(i in 1:columns_amount) {
    for(j in (i + 1):columns_amount) {
        print(ggplot(...))
    }
}

dev.off()

```

The `print()`-method in this case prints the plot to the PDF-file. But I want to add something to print `i` and `j` values to console, so it looks like:

```
for(i in 1:columns_amount) {
    for(j in (i + 1):columns_amount) {
        print(ggplot(...))
        print_to_console(i, j)
    }
}

```

Are there any possibilities to do that? I just want to know, which stage the program is on.