Skip to content
/ SileR Public

This is the repository for the R package SileR for the publication "Differences in age-specific mortality between wild-caught and captive-born Asian elephants"

Notifications You must be signed in to change notification settings

courtiol/SileR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SileR

This is the GitHub repository hosting the R package SileR. The package will not evolve much in the future because it aims at documenting how we obtained the results for the paper entitled “Differences in age-specific mortality between wild-caught and captive-born Asian elephants” by Mirkka Lahdenperä, Khyne U Mar, Alexandre Courtiol and Virpi Lummaa (Nature Communications 2018).

The only planned updates are those that will be necessary to maintain compatibility with other packages, so that our code won’t break.

The main goal of the R package SileR is to fit survival models derived from a model introduced by Siler (“A competiting-risk model for animal mortality”, Ecology, 1979). The main differences are that the effect of covariate(s) are being investigated and that the survival models have to be fitted on right and left censored longitudinal data.

This package has not been conceived for general use. It serves to document the steps of our analysis.

How to explore the sources of the package?

To see our source code, you can either browse the files above within GitHub or download the *.tar.gz file containing all sources bundled with some data to try out our functions in R. This file is available here: https://github.com/courtiol/drat/blob/gh-pages/src/contrib/SileR_0.9.0.tar.gz

Installation

Since the package contains C++ code that needs to be compiled, there are two possibilities for installation. The easiest one is to install the binary version of our package. We have created one for Windows and one for MacOS but that may fail depending on your exact infrastructure. The alternative is to compile the sources of the package on your own computer but that may require you to install some development tools.

General installation requirements

Whichever option you choose, to install successfully the R package you will need:

install.packages("drat")

Installation from binaries

Simply type the following:

drat::addRepo("courtiol")
install.packages("SileR")

Installation from sources

This option requires the tools allowing to compile R packages on your computer:

Then, simply type the following:

drat::addRepo("courtiol")
install.packages("SileR", type = "source")

Usage

  1. load the package:
library("SileR")
  1. access the main documentation by typing:
help("SileR")

About

This is the repository for the R package SileR for the publication "Differences in age-specific mortality between wild-caught and captive-born Asian elephants"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published