Installation notes

The easiest way to install the package is with

install.packages("diversitree")

which will get the most recent version from CRAN. However, this is sometimes out of date, as I don't put every version up there. In that case, you will probably have to install from source.

From Github

In between releases on the diversitree website (and the less frequent CRAN releases), bleeding-edge versions of diversitree can be obtained from github:

git clone git://github.com/richfitz/diversitree.git

Which will create a directory diversitree. From within the diversitree/diversitree directory, run

autoheader
autoconf

to generate the configure script. From within the diversitree directory,

R CMD INSTALL diversitree

or

R CMD INSTALL diversitree --configure-args='--with-fftw=/path/to/fftw'

QuaSSE installation issues

QuaSSE requires that the fftw (Fastest Fourier Transforms in the West) libraries are installed. If you want to use QuaSSE, before installing diversitree, download and install fftw. If you install fftw in a different location than a "standard" location (i.e., somewhere that your C compiler will find headers and libraries automatically) you have to tell the compilers where it is:

R CMD INSTALL diversitree --configure-args='--with-fftw=/path/to/fftw'

where the path will be the path so that the files

/path/to/fftw/include/fftw3.h
/path/to/fftw/lib/lib/fftw3.so

exist. When installing, look for a line that says

Using fftw for QuaSSE FFT calculations

in the output. If you see

configure: WARNING: No fftw found - QuaSSE/fftC will not be available

then diversitree could not find the fftw libraries.

On Windows, set the environment variable LIB_FFTW to point to the directory that contains include/fftw.h, and install the package. Far less checking is done when installing on windows, due to limitations with the build system there. As I don't have a windows system at present, I cannot test this, and am only assured that it works. Alternatively, email me if the CRAN version is out of date, and I can arrange to have a binary package built for you.