# Monthly Archives: October 2007

## Changing the fonts in R plots

October 28, 2007
By

Tweet I use R to do almost all of my statistical analysis and plotting. It has a very steep learning curve but once you get into it, it’s very powerful and you can customise almost anything. The only problem is that these changes are not always obvious or easy to do. Case in point: how to change...

## Quick-R: a great R tutorial site

October 23, 2007
By

Quick-R, by Robert Kabacoff, is a wonderful R introduction site. It covers data management, basic and advanced statistics, and graphing in R, and it is aimed at an audience that has previous experience using other packages (such as SAS or Stata) that w...

## Approximate sunrise and sunset times

October 17, 2007
By

This function is not perfect, but it does a reasonable job estimating sunrise and sunset times for my field site. If more accurate data are required, try here. Note, the command to calculate day of year is: strptime(x, "%m/%d/%Y")\$yday+1suncalc

## Convert polar coordinates to Cartesian

October 14, 2007
By

When I want to calculate the coordinates of a location (e.g., a nest or burrow) based on distance and bearing from a grid point, this function helps me avoid writing down SOH-CAH-TOA every time. Just note that the bearing in this case is from the grid ...

## If you don’t use R to fit multilevel models, there’s no point in reading this one

October 6, 2007
By

David Afshartous writes, What is the difference between sim() and mcsamp(), if any? If there is a difference, what should I expect in terms of difference in results? My reply:...

## GillespieSSA 0.3-1 released

October 4, 2007
By
$GillespieSSA 0.3-1 released$

I recently rolled up the new version of the GillespieSSA package, version 0.3-1. The tar ball of the new version is posted on its web page (here). I also submitted it to CRAN so in (due time) it should appear … Continue reading →

## Special Volume of JSS on Ecology and Ecological Modelling in R

October 3, 2007
By

The latest issue Journal of Statistical Software is a special volume on Ecology and Ecological Modelling in R. This has been in the woodwork for quite some time now and it is nice to finally to see this out “in … Continue reading →

## Reorder factor levels

October 3, 2007
By

Very often, especially when plotting data, I need to reorder the levels of a factor because the default order is alphabetical. There must be many ways of reordering the levels; however, I always forget which package to look in. A direct way of reorderi...

## R video tutorial number 2

October 2, 2007
By

READ TEXT FILES, RUN MODELS The Decision Science News R video tutorials continue with number 2. (If you missed that last one, you will want to watch R Video Tutorial Number 1 first.) The Goldstein pedometer dataset can be downloaded from http://www.dangoldstein.com/flash/Rtutorial2/pedometer.csv Topics covered this week include: Tricking R into starting in your working directory Reading in text