SAVE_TO_PDF = FALSE # change this to TRUE to save to a PDF
pdf_print(
lattice::xyplot(
1:4 ~ 11:14,
xlab = 'X',
ylab = 'Y',
type = 'b'
),
save_to_pdf = SAVE_TO_PDF,
file = 'example.pdf', # this name will only be used when saving to a PDF
new_window = FALSE # necessary for rendering the documentation examples
)
Run the code above in your browser using DataLab