README_old.md

README

This repository contains the R package for "Directed Random" research paper. This R packge was implmented using devtools developement framework. The content of this repository are the following:

Installation Instructions

Please note that these instructions have been tested on an Ubuntu 16.04 LTS workstation running the following version of R:

R version 3.3.3 (2017-03-06) -- "Another Canoe"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

You can type the next command in your R development environment if you want to want to install the package using devtools. This method is ideal if you plan to leverage, without modification, our existing functions and data sets in your own work.

devtools::install_github("schemaanalyst/directedRandom-R-pkg")

Example Run

In your R environment use the following commands:

mutants <- directedRandomR::collect_mutanttiming()
analysis <- directedRandomR::collect_mutationanalysistime()
x1 <- directedRandomR::table_generator_timing(analysis, rtrn = "data", m = "mean")
x2 <- directedRandomR::table_generator_coverage(analysis, rtrn = "data", m = "mean")
x3 <- directedRandomR::table_generator_mutation_score(mutants, rtrn = "data", m = "mean")
x4 <- directedRandomR::table_generator_mutant_operators(mutants, rtrn = "data", m = "mean")

NOTE: The rtrn parameter is used to return either a dataframe (rtrn = "data") or a latex table (rtrn = "tex"). The m parameter is used to print the table as median or mean results.

R Scripts

Major functions used in the paper is:

Developement

If you are interested in extending this package with new data sets and your own functions, then you can run the following command to first clone this repository:

git clone https://github.com/schemaanalyst/directedRandom-R-pkg.git

In an R environment you can run each of the following commands to build and test our R packages using devtools:

devtools::document()
devtools::install()
devtools::load_all()
devtools::test()

Test Results

Whilst running tests the following results will appear:

coverages-sample-size: ....
coverages-median-resutlts: ....
coverages-effect-size: ...
coverages-u-test: ...
mutant-operators-sample-size: ........
mutant-operators-mean-results: ............
mutant-operators-u-test-results: ...........
mutant-operators-effect-size-results: ...........
mutant-scores-mean-results: ....
mutant-scores-sample-size: ....
mutant-scores-u-test-results: ...
mutant-scores-effect-size-results: ...
table-generator: ........
testgenerationtiming-sample-size: ....
testgenerationtiming-median-results: ....
testgenerationtiming-u-test-results: ...
testgenerationtiming-effect-size-results: ...

DONE =========================================

Generating Plots, RMarkDown, and Sweave

To build the RMarkDown and Sweave to review our results, you would need the pandoc and LateX installed in your current OS.

Also you would need the templates in the following repo:

git clone https://github.com/schemaanalyst/directedRandom-data

The following commands are done in OS terminal command, not in the R shell, and within the above cloned repo directory:

Rmarkdown

Rscript -e "rmarkdown::render('RmarkDownFigures.Rmd')"

Sweave (latex) for tables

R CMD Sweave tables.Rnw

Then

pdflatex tables.tex


schemaanalyst/directedRandom-R-pkg documentation built on May 29, 2019, 3:37 p.m.