Latest Update Date: 2019 March
| Name | GitHub Handle | | ---- | ------ | | Alex Hope | @ehhope | | Zixin Zhang | @zxzzhangg | | Aaron Quinton | @aaronquinton |
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()
You can install the released version of LibRely
from CRAN in R with:
devtools::install_github("UBC-MDS/librely")
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
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.
LibRely
. Our package fits the R ecosystem because it analyzes a .R
script and all these functions return common return types, like a vector, a list and a tibble.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.