R only does natural (neperian) log scales by default, and this is lame. Here is a simple code to do decimal log scale, pretty much a requirement for scientists… The force(x/y)lim options works for natural and log scales (for the later case, you need to specify the ... [Read more...]
Producing this kind of graphs (below) in R can be a pain in the a*s. Here is a simple code that requires that data are presented in lists (see the example below). multbar [Read more...]
The GenEstim function presented here uses a very simple genetic algorithm to estimate parameters. The function returns the best estimated set of parameters ($estim), the AIC ($information) at each generation, and the cost of the best model ($bestcost) at each generation. Results of running the program with a logistic function : ... [Read more...]
I spend some time looking for an algorithm to find local extrema in a vector (time series). The solution I used is to “walk” through the vector by step larger than 1, in order to retain only one value even when the values are very noisy (see the picture at the ... [Read more...]