Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

AsexStats : an R package for computing stats of asexual genome evolution. Developed specifically for AsexGenomeEvol project

The project is hosted at :

Content of the package

I will categorize functions by type (project specific will be somehow marked as well)

loading functions

  • filter_thetas - function for filtering thetas

plotting functions

  • sex_legend - plots a sex/asex legend
  • plot_log_hist - plots y-log histogram of sex/asex data


  • ssplit - split a string into vector of substring
  • make_data_frame - create a data.frame with predefined column names

data & variables

  • timema_pairs - useful descriptors of species pairs (labels, divergence_times, ...)
  • timemas - timema species labels stored in a list (codes, labels, ...)
  • asex_blue, sex_red - colours used for asexual and sexual species


  • get the package (clone or download the latest code)
  • open terminal in the folder of the package and run Rscript install.R,

or using devtools package, run R and type

install_github("AsexGenomeEvol/AsexStats", build_vignettes=FALSE)

local installation

Users on clusters classically do not have a root access and therefore they won't be able to install R packages to the common folders of all the users. To access an R package without root access you need to install the package on some alternative place (like your home) and tell R that there will be an alternative place to look for packages.

The very beginning is the same, download this package, then create a place for your local R packages (/home/$USER/R in this example).

cd ~
git clone
mkdir -p /home/$USER/R
CMD INSTALL AsexStats -l /home/$USER/R

Now the package was installed to your home (~/R). To tell R about the alternative path you set an environmental variable by adding the line export R_LIBS=/home/$USER/R into your .bashrc file (the setting file of your bash)

echo "export R_LIBS=/home/$USER/R" >> ~/.bashrc


  • testing is done using testthat and it is integrated to installation (if test wont pass, installation fails)
  • documentation is generated using devtools and roxygen2
  • you can use make for rebuilding package - however, the Makefile is not fully portable (yet?), you need to modify path to your R package inside of the makefile.
  • use branches and pull requests for development of the new features

Adding new data

  • create an R script (*.R) in folder data-raw that will generate a *.rdata data file in data folder
  • add the name of data/scripts in R/data.R (use one of previous entries as template)
  • add the name to VARIABLES in the Makefile
  • document and reinstall package
  • before making a commit, check that data look as expected and check if the documentation of data (?mydata) looks as expected


R package with handy functions for analysis of asexual arthropods



No releases published


No packages published
You can’t perform that action at this time.