Skip to content

Instantly share code, notes, and snippets.

@mbohun
Created September 22, 2014 06:15
Show Gist options
  • Save mbohun/0bc32c3b4e4526e8797f to your computer and use it in GitHub Desktop.
Save mbohun/0bc32c3b4e4526e8797f to your computer and use it in GitHub Desktop.
test a snippet in R / markdown

blah, blah, blah:

  1. aaaa
  2. bbbb
  3. cccc
tr=plotTree(ax,type="fan",ftype="off") ## plot tree without labels
## add each image
library(jpeg)
for (k in which(nchar(imfiles)>0)) {
    tryCatch({ 
               im=readJPEG(imfiles[k]); 
           rasterImage(im,tr$xx[k]-1/10,tr$yy[k]-1/10,tr$xx[k]+1/10,tr$yy[k]+1/10) },
           error=function(e){invisible(1)})
}
tr=plotTree(ax,type="fan",ftype="off") ## plot tree without labels
## add each image
library(jpeg)
for (k in which(nchar(imfiles)>0)) {
tryCatch({
im=readJPEG(imfiles[k]);
rasterImage(im,tr$xx[k]-1/10,tr$yy[k]-1/10,tr$xx[k]+1/10,tr$yy[k]+1/10) },
error=function(e){invisible(1)})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment