Skip to content
Prev 309805 / 398503 Next

Saving R Graph to a file

Hello,

#Example 1: The following code to save svyboxplots works for me

pdf("boxplots_dthage.pdf", width = 1020) # 4 boxplots in 2 columns and 2 rows
par(mfrow=c(2,2),  oma=c(0,0,0,0))
# svyboxplot commands not shown
dev.off()


#Example 2: The following code to save a ggplot graph works for me:
# ggolot () not shown
print (p)
ggsave(file='Xfacet_abodill_age3.pdf', width=12, height=8) 


Thanks,

Pradip Muhuri