Closed demorsick closed 1 year ago
@demorsick: Have you tried generating a PDF as suggested in the calendR
README instead of writing your own code to do so?
Also, I cannot try to work with your code due to all newlines being gone. Do mind editing you post from
`
[1st line of code]
[2nd line]
...
[last line of code]
`
which renders as
[1st line of code] [2nd line] ... [last line of code]
(see above) to
```r
[1st line of code]
[2nd line]
...
[last line of code]
which renders as
[1st line of code] [2nd line] ... [last line of code]
with R syntax highlighting?
right now i can't,but even when i follow the example it does give me that output,unless i'm using Rstudio i'm on fedora 36
I do not use RStudio and have successfully generated A4 calendars before. So once I can test your code, I'll try to track this down.
here is the code https://pastebin.com/zq1esQfC ,the output is always https://github.com/R-CoderDotCom/calendR/files/9748320/Rplots.pdf
I'm sorry if made you waste your time,the problem was that i forgot to type pdf=TRUE,but with Rstudio I didn't had to it
after I
Rscript file.R
content of file.R :pdf(paper = "a4") library(calendR) dates <- seq(as.Date("2023-01-01"), as.Date("2023-01-31"), by = "1 day") events <- ifelse(format(dates, "%w") %in% c(0), "Domenica", NA) events[1] <- "Festività" events[c(5, 22, 8)] <- "Compleanni" calendR(year = 2023, special.days = c(events), special.col = c("lightgreen","blue","#bfe2f2"), legend.pos = "bottom", month = 1, start = "M", title = "Gennaio", title.size = 70, title.col = 2, weeknames = c("L", "M", "M", "G","V", "S", "D"), col = "#f2f2f2", lwd = 1, lty = 1, mbg.col = 4, weeknames.col = "red", days.col = "black", # Color of the number of the days day.size = 5, # Size of the number of days bg.img = "https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fwww.settemuse.it%2Fsfondi_ambiente%2Fstagione_inverno%2Fstagione_inverno_013.jpg&f=1&nofb=1&ipt=988c0a811e94f34c73f5d49afd3c897a2c17332da6d5bfd6528ce3017814123a&ipo=images") # Background image dev.off()
i get this pdf which is badly formatted Rplots.pdf