Git Product home page Git Product logo

barnlarv's Introduction

barnlarv

Travis-CI Build Status DOI

This is a companion R package to the paper:

Wong, J. Y., Chan, K. Y. K., & Chan, B. K. K. (2018). Phylogenetic, ecological and biomechanical constraints on larval form: A comparative morphological analysis of barnacle nauplii. PLoS ONE, 13(11): e0206973. doi:10.1371/journal.pone.0206973

Findings reported in the paper can be reproduced with the datasets and codes from this package.

NEW: Interactive version of the figures

Easier way to explore the data and understand the analysis. CLICK HERE to view the interactive plots.

plotly.mp4

Installation:

  • using tarball from releases page*. In R:
install.packages("<path to downloaded zip/tarball>",repos = NULL)
  • using devtools. In R:
devtools::install_github("jinyung/barnlarv")

*Note:

  1. binaries for Windows not provided, devtools method should work across platforms.

  2. releases page also contains package manual.


Using data from the package

Outlines and sampled outlines dataset

Interspecific barnacle nauplii outline and sampled outline datasets can be found in data directory and called directly in R, e.g.:

data(stage2outline)
data(stage2landmark)

see ?outline or ?semilandmark for help files of these datasets. These datasets were pre-processed from raw images stored in inst/extdata/stage2/larvae_drawing and inst/extdata/ontogeny/larvae/drawing directories. The processing can be reproduced following the codes stored in data-raw directory. In data-raw, the .tps files of the sampled outlines are also available and can be imported into other geometric morphometrics software.

Covariates and phylogeny data

Data for covariates used in the main analyses can be found here or called in R with:

read.csv(system.file("extdata/stage2", "frontal-horn-summary.csv",
         package = "barnlarv"))

Data of phylogeny for a subset of species can be found here or called in R with:

ape::read.tree(system.file("extdata/perez-tree-37-species", 
               package = "barnlarv"))

Reproducing the results

All tables and figures can be reproduced following the dynamic R markdown documents, which can be download here.

There are three files inside .zip:

  1. figures_and_tables.Rmd
  2. supplementary_figures_and_tables.Rmd
  3. preamble.tex

file 1 will produce figures and tables in the main paper; file 2 will produce the supplementary tables and figures; file 3 is used for formatting in knitr compilation of Rmd files for pdf outputs. Compiling the Rmd files will reproduce the results*.

*NOTE: the figures, tables, and supplements were created with barnlarv v0.0.2, as such can only be 100% reproduced with the specific R session environment used when the paper was written. See v0.0.2 release notes for details.

barnlarv's People

Contributors

jinyung avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.