Created
February 11, 2014 12:45
-
-
Save jakosz/8934214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Invokes imagemagick to merge png files and cleans up tmp files produced by plot_segments_mc: | |
compose_clean <- | |
function(file, mc.cores) { | |
t0 = Sys.time() | |
for (i in mc.cores:1) { | |
system(ps('composite mcp-tmp-', i, '.png mcp-tmp-', i - 1, '.png mcp-tmp-', i - 1, '.png')) | |
} | |
# composite execution time; catched by a testing script | |
.imTime <<- Sys.time() - t0 | |
print(.imTime) | |
file.rename('mcp-tmp-0.png', file) | |
file.remove(ps('mcp-tmp-', 1:mc.cores, '.png')) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment