---
title: "Installing R and TreeSearch"
author: "Martin R. Smith"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
bibliography: ../inst/REFERENCES.bib
csl: ../inst/apa-old-doi-prefix.csl
vignette: >
  %\VignetteIndexEntry{Getting started: installation and setup}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---


`TreeSearch` is an R package that allows parsimony search on morphological datasets.

## Installation

### Simple installation

To use `TreeSearch` you will first need to [install R](https://CRAN.R-project.org/).  Many people like to 
use [Rstudio](https://www.rstudio.com/) ([overview](https://dss.princeton.edu/training/RStudio101.pdf)), which is a front-end that makes several of R's features easier to use.

The TreeSearch package can be installed as any other package. 
To get the latest stable version from CRAN, type
```r
install.packages('TreeSearch')
```
into the R (or Rstudio) command line.

### For advanced users

To get the latest development version from GitHub, type
```r
if (!require('devtools')) install.packages('devtools')
devtools::install_github('ms609/TreeSearch')
```

You'll probably need to install [Rtools](https://cran.r-project.org/bin/windows/Rtools/) before 
installing from the GitHub source code, which may be complicated.  

If you do already have Rtools installed, then you 
may wish to install a byte-compiled version of `ape` for additional speed:

```r
install.packages('ape', type='source', INSTALL_opts='--byte-compile')
```

Once installed, load the inapplicable package into R using
```{r Load library}
library('TreeSearch')
```

## What next?

You might want to:

- [Load data](load-data.html) from a NEXUS file or spreadsheet
- Conduct parsimony search using Brazeau, Guillerme & Smith's [approach to inapplicable data](inapplicable.html), or using [Profile parsimony](profile.html).
