Skip to content

Instantly share code, notes, and snippets.

View MattNapsAlot's full-sized avatar

Matthew D. Furia MattNapsAlot

  • Novartis
  • San Diego
View GitHub Profile
@MattNapsAlot
MattNapsAlot / install_version.R
Created October 6, 2012 16:44
bug-fixed version of Hadley Wickham's install_version() method from the devtools package
library(devtools)
install_version <- function (package, version = NULL, repos = getOption("repos"),
type = getOption("pkgType"), ...)
{
contriburl <- contrib.url(repos, type)
available <- available.packages(contriburl)
## converting the version to numeric breaks packages that use dashes in their version numbers
# if (!is.null(version)) {
@MattNapsAlot
MattNapsAlot / lma.logfit.R
Created September 18, 2012 03:55
Fitting a 4-parameter logistic curve using the Levenburg-Marquardt algorithm
require('minpack.lm');
###### START FUNCTION DEFINITIONS ###########
##Coded by M. Furia June 2007
lma.dologfit = function(x,y){
compute.logistic.x = function(y,min,max,infl,slope){
return(infl - (1/slope)*log10((max - min)/(y - min)- 1));
}
# define the logistic function