emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Including multiple plots resulting from a loop of R code in LaTeX
@ 2012-08-22 17:41 John Hendy
  2012-08-23 16:43 ` Eric Schulte
  0 siblings, 1 reply; 10+ messages in thread
From: John Hendy @ 2012-08-22 17:41 UTC (permalink / raw)
  To: emacs-orgmode

I'm conducting some neural network analysis, and the results are
highly dependent on the random seed set prior to creating the model. I
loop through seeds 1-500, storing the predicted values in one data
frame and a table of mean sum of squared errors in another table.

Then, I use ggplot to create only the 10 or so plots with the lowest
error. The loop is something like this:

----------
for(i in 1:10) {

filename <- paste("neuralnet-","-seed-",as.character(mse[i,1]),".pdf", sep="")

pdf(filename, width=12, height=8)

[ggplot code]

dev.off()
----------

What I want to know is how to include the resultant files in LaTeX
export. Since my model runs and then sorts by error, I don't know
which seeds produce the best files beforehand, so I'd have to look at
the error table and manually insert the plot names by hand. Changing
results means changing file names by hand again.

Any suggestions for things like this where the output of a babel block
is not a single file?


Thanks,
John

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-08-27 21:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-22 17:41 Including multiple plots resulting from a loop of R code in LaTeX John Hendy
2012-08-23 16:43 ` Eric Schulte
2012-08-27  2:58   ` John Hendy
2012-08-27  3:15   ` John Hendy
2012-08-27  3:24     ` John Hendy
2012-08-27 20:16       ` John Hendy
2012-08-27 20:40         ` Nick Dokos
2012-08-27 21:40           ` John Hendy
2012-08-27 20:50         ` Eric Schulte
2012-08-27 21:37           ` John Hendy

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).