(This article was first published on R Tips's blog, and kindly contributed to R-bloggers)
Did you know that there are multiple versions of the min and max function. make sure that you are using the right one. pmin and pmax are the 'parallel' versions of the min and max function, meaning that they can take vector arguments and return vectors back. Much better than setting up your own apply function. So make sure that you are using the right version.
To leave a comment for the author, please follow the link and comment on his blog: R Tips's blog.
R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series,ecdf, trading) and more...

Zero Inflated Models and Generalized Linear Mixed Models with R.
Zuur, Saveliev, Ieno (2012).