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

XploRer

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.
R build status

The goal of XploRer is to read, write, analyze and plot MTG (Multi-scale Tree Graph) files. These files describe the plant topology (i.e. structure) along with some attributes for each node (e.g. geometry, colors, state...).

The package is under intensive development and is in a very early version. The functions may heavily change from one version to another until a more stable version is released.

Table of Contents

1. Installation

You can install the release version of XploRer from GitHub with:

# install.packages("devtools")
devtools::install_github("VEZY/XploRer")

2. Brief introduction

A more in-depth introduction is available in the introductory vignette from the getting started tab.

Specialized articles from the Articles tab describe the functionality in details.

2.1 Read a file

Read a simple MTG file:

library(XploRer)

MTG = read_mtg("https://raw.githubusercontent.com/VEZY/XploRer/master/inst/extdata/simple_plant.mtg")

2.2 Mutate

Mutate the MTG to add/recompute node attributes:

MTG%>%
  mutate_mtg(section_surface = pi * ((node$Width / 2)^2), .symbol = "Internode")%>%
  mutate_mtg(s_surf_child_sum = sum(children(node$section_surface),na.rm=TRUE),
             .symbol = "Internode")

print(MTG, ".symbol", "Width","section_surface", "s_surf_child_sum")

2.3 Plot

2.3.1 Static plot

The plant topology can be plotted using the autoplot() function. This function is implemented by ggplot2 so you'll need to load this package before-hand:

library(ggplot2)
autoplot(MTG)

2.3.2 Interactive plot

The same plot can be rendered as an interactive plot using:

plotly_mtg(MTG)

Interactive plot

3. Help

Please see the OpenAlea documentation (especially chapter 8) for more details on the MTG files.

If you have any other problem related to the package, please feel free to fill an issue on Github.

4. Contribute

Contributions are more than welcome! Whatever your programming level really. If you need help on your first contribution, fill an issue about it.

If you find any issue, want to make a suggestion, or need a new functionality, please fill an issue. This is not more complicated than writing an email (but really simpler for us), just follow the steps one by one. Look into this article for more info.

If you want to contribute, please read our contribution guidelines first. It's a few minutes read only and guides you through the whole process of contributing (along with many useful tools).

5. Code of Conduct

Please note that the XploRer project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

6. Roadmap

To do before v1:

In a more distant future (v2):



VEZY/XploRer documentation built on Oct. 9, 2021, 10:05 p.m.