knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

seaiceR

The goal of seaiceR is to simplify temporal and spatial analysis of sea ice data (for example, break-up dates for a number of years at a number of locations in a study area).

Installation

You can install the released version of seaiceR from Github with:

devtools::install_github("nxskok/seaiceR")

Setup

You need two data frames to start (eg. read in from spreadsheets):

The package includes data frames called nine_points and nine_points_locations which are real data from nine points. These data can be used to try out the package, and will be demonstrated here.

Example

The basic function that does the whole analysis for a data set is called make_everything. This has defaults, but needs input of the data frames described above plus a parameter n_cluster which is the number of clusters for the cluster analysis. The last input n_cluster must be specified by name (the function has a lot of optional inputs).

library(seaiceR)
make_everything(nine_points, nine_points_locations, n_cluster=4)

Of course, the initial number of clusters will be a complete guess, but the output includes a scree plot and dendrograms, so make_everything can be run a second time with an improved number of clusters.

There is a lot of output. Specifically, in order:

Tweakable things

If you want an individual time trend graph (eg. to copy into another document), get it like this:

time_trend_single(nine_points, loc=6)

or like this to get a linear trend:

time_trend_single(nine_points, loc=6, lowess=FALSE)

Don't be afraid to run several times until you have output that looks nice. R can take it. (There is some repetitiveness in the calculation anyway).



nxskok/seaiceR documentation built on Nov. 4, 2019, 10:12 p.m.