annotate plot_pdf.r @ 81:b6f9a640e098 draft

Uploaded
author davidvanzessen
date Fri, 19 Feb 2021 15:10:54 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
81
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
1 library(ggplot2)
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
2
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
3 args <- commandArgs(trailingOnly = TRUE)
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
4 print(args)
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
5
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
6 input = args[1]
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
7 outputdir = args[2]
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
8 setwd(outputdir)
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
9
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
10 load(input)
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
11
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
12 print(names(pdfplots))
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
13
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
14 for(n in names(pdfplots)){
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
15 print(paste("n:", n))
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
16 ggsave(pdfplots[[n]], file=n)
b6f9a640e098 Uploaded
davidvanzessen
parents:
diff changeset
17 }