README.md

Build Status

LibRely (R)

Latest Update Date: 2019 March

Collaborators

| Name | GitHub Handle | | ---- | ------ | | Alex Hope | @ehhope | | Zixin Zhang | @zxzzhangg | | Aaron Quinton | @aaronquinton |

Releases

Milestone 1 Release

Milestone 3 Release

Overview

The LibRely package is designed to provide a meta analysis of R scripts to aid in the workflow for a data science or software development project. The functionalities in this package interpret scripts to compile library/module dependencies, document specific functions imported in the script and measure the length of the script by the number of lines and characters.

The user can use LibRely to better understand the packages used in a script authored by someone else. Alternatively, a user can take advantage of the functionalities when preparing the ReadMe documentation in their project. The following functions are included in the LibRely package.

lib_search()

lib_count()

lib_lines()

Installation

You can install the released version of LibRely from CRAN in R with:

devtools::install_github("UBC-MDS/librely")

Usage

This is a simple usage case of our package in R under the LibRely-R- working directory.

> devtools::load_all()
> library(librely)   

> lib_search("tests/testthat/file/script_for_test1.R")
[1] "dplyr"  "tibble"

> lib_count("tests/testthat/file/script_for_test1.R")
# A tibble: 4 x 3
  package_name function_name count
  <chr>        <chr>         <int>
1 dplyr        mutate            1
2 dplyr        summarize_all     1
3 dplyr        tibble            1
4 tibble       tibble            1

> lib_lines("tests/testthat/file/script_for_test1.R")
$num_line
[1] 7

$num_char
[1] 193

Branch Coverage Test

We use covr package for branch test. You can go to LibRely.Rproj and run the following command lines

install.packages("covr") # if you don't have it installed
library(covr)
report()

The results are shown below.

R Ecosystems



UBC-MDS/LibRely-R- documentation built on May 7, 2019, 7:14 p.m.