## Overview

The bamr package facilitates Bayesian AMHG + Manning discharge estimation using stream slope, width, and partial cross-section area. It includes functions to preprocess and visualize data, perform Bayesian inference using Hamiltonian Monte Carlo (via models pre-written in the Stan language), and analyze the results.

## Installation

As of version 0.1.6, the recommended installation method is to use the drat package, which facilitates using install.packages() to get the latest release of bamr. Windows users get the added benefit of having a pre-compiled binary installation, saving a significant amount of compilation time and memory overhead.

The following commands will get the drat package, give R access to the repository containing bamr, and install the bamr package from that repository.

install.packages("drat") # Get the drat package
drat::addRepo("markwh") # Add the repository containing the bamr package
install.packages("bamr")

More information about drat is available here.

### Installation from github

The old way of installing bamr from github still works. To do that, run the following.

# First get devtools package
if (!require("devtools")) {
install.packages("devtools")
library("devtools")
}

# Then install from github
install_github("markwh/bamr", local = FALSE)

## Usage

The best way to get started is to follow the examples in the included vignettes, now located at the bamr website

Also check out the companion swotr package.