Skip to content

Instantly share code, notes, and snippets.

View MarkusLoew's full-sized avatar
🎯
Focusing

Markus Löw MarkusLoew

🎯
Focusing
  • University of Melbourne
View GitHub Profile

Keybase proof

I hereby claim:

  • I am markusloew on github.
  • I am markusloew (https://keybase.io/markusloew) on keybase.
  • I have a public key ASAMZL9QUx_WgGbxKdkCn5eN3XNlK-bbN1QH_f3iDTv5IQo

To claim this, I am signing this object:

# only install the package once, not each time you run the script!
#devtools::install_github("MarkusLoew/FitAQ")
#install.packages("FitAQ")
#clean up list
rm(list = ls())
library(FitAQ)
library(quantreg)
# only install the package once, not each time you run the script!
#devtools::install_github("MarkusLoew/FitAQ")
#install.packages("FitAQ")
library(FitAQ)
library(quantreg)
source("fitAQnew_AG_1606.R")
#clean up list
#rm(list = ls())
@MarkusLoew
MarkusLoew / FitAQ_with_quantreg.R
Created June 17, 2020 03:00
How to fit a photosynthetic light response curve to the upper 95% of data
# How to fit a photosynthetic light response curve to the upper 95% of data
# Markus Löw, June 2020
# using package "FitAQ" from
# https://github.com/MarkusLoew/FitAQ
# and quantile refression
library(FitAQ)
library(quantreg)
# example data frame with 200 data points from light response curves
#' Markus Löw, Aug 25, 2017
#' sorting a distance matrix similar to heatmap and heatmap.2
#' without the plotting overhead
#' original code from Saro
###################
library(sommer)
library(gplots)
###################
# size of the matrix rows = columns
dims <- 8402
# create matrix
a <- matrix(NA, nrow = dims, ncol = dims)
format(object.size(a), units = "Mb")
# add random data, check how long it takes
system.time(
a[] <- sapply(a[], function(x) runif(1))