A collection of Poisson lognormal models for multivariate count data analysis
R C++
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
inst
man
src
vignettes
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
LICENSE
NAMESPACE
PLNmodels.Rproj
README.md
cleanup
configure

README.md

PLNmodels: Poisson lognormal models

Description

The Poisson lognormal model and variants can be used for a variety of multivariate problems when count data are at play (including PCA for count data and network inference). This package implements an efficient algorithm to fit such models accompanied with a set of functions for vizualisation and diagnostic.

Installation

Build Status

Linux

Installation from source on Linux requires libnlopt 2.4-2. On Debian or Ubuntu use libnlopt-dev:

sudo apt-get install libnlopt-dev

On Fedora we need NLopt-devel:

sudo yum install NLopt-devel

Then you can install from github

devtools::install_github("jchiquet/PLNmodels")

MAC OS

Installation requires nlopt, which can be installed via homebrew

brew install nlopt

Finally install the package via

devtools::install_github("jchiquet/PLNmodels")

Troubleshooting

If you experience problems due to the lack of OpenMP support in Clang like

clang: error: unsupported option '-fopenmp'
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘PLNmodels’

have a look a this page or this issue

A simple fix (for R 3.4.x) consists in installing the dev tool chains for Mac OS X: https://github.com/coatless/r-macos-rtools/releases/download/v1.1.0/macos-rtools-1.1.0.pkg

For R 3.5.x, you can also install the CRAN Mac OS toolchain from https://cran.r-project.org/bin/macosx/tools/, especially the Clang 6.0.0 compiler and the GNU Fortran 6.1 compiler and modify your Makevars to make it look like

F77 = /usr/local/bin/gfortran
FC = $F77
CXX =  /usr/local/clang6/bin/clang++  -Wall
LDFLAGS=-L/usr/local/clang6/lib
CC=  /usr/local/clang6/bin/clang
SHLIB_CXXLD=ccache /usr/local/clang6/bin/clang++
CXX11 =  /usr/local/clang6/bin/clang++
CXX98 =  /usr/local/clang6/bin/clang++
CXX14 =  /usr/local/clang6/bin/clang++

Windows

Not supported yet...

Use and example

See the package vignette running PLNPCA and PLNnetwork on the ade4 Trichoptera data set. To build the vignettes on intallation, you need the ade4 package installed and to run the following code:

devtools::install_github("jchiquet/PLNmodels", build_vignettes=TRUE)