Skip to content

Instantly share code, notes, and snippets.

@gimoya
gimoya / source_tBB.R
Created December 13, 2011 07:57
Function to source theBioBucket-Scripts
source_tBB <- function(file) {
# read theBioBucket-scripts using a security certificate
u <- paste("https://raw.github.com/gimoya/theBioBucket-Archives/master/R/", file, sep = "")
script <- getURL(u, followlocation = TRUE,
cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))
# parse lines and evaluate in the global environement
eval(parse(text = script), envir= .GlobalEnv)
}
@gimoya
gimoya / jpeg_transparency.R
Created December 12, 2011 10:50
function for adding transparency to a jpeg-image
# file: jpeg_transparency.R
# purpose: add transparency to jpeg
# author: kay cichini
# arguments: path_to_jpeg, path_to_outfile, alpha (transparency 0-1)
# path_to_outfile defaults to default home directory
# alpha defaults to 0.5
# packages used: jpeg, png
# input: a jpeg image
# output: a png image