README

Build Status Project Status: WIP ? Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. CRAN_Status_Badge packageversion

Table of Contents

  1. Introduction
  2. Installation
  3. Adding YesWorkflow annotations in R scripts
  4. Generating RDF from YesWorkflow annotations

Introduction

This special version of the strcode package (short for "structuring code") contains tools to help you organize and abstract your R scripts and to embed semantics according to the ProvONE Data Model for Workflow Semantics. It consists of:

  • An RStudio Add-in that lets you quickly insert code block separators and titles (possibly with unique identifiers) to divide your work into sections. The titles are recognized as sections by RStudio, which further enhances the coding experience.
  • A function sum_str that summarizes the code structure based on the separators and comments added with the Add-in. For one or more files, it can send the structure to the console or a file.
    • NEW: The sum_str function now can structure code with embedded semantics and can generate RDF files (N3 format) sum_str has built-in rules for automatic property generation for ProvONE entity types.
  • An RStudio Add-in that lets you insert a code anchor, that is, a hash sequence which can be used to uniquely identify a line in a large code base.

Installation

You can install the package from GitHub.

# install.packages("devtools")
devtools::install_github("XiaoliangJiang/IndependentStudy2017YW")

Adding YesWorkflow annotations in R scripts

The animation below shows using strcode for embedding YesWorkflow annotations in R scripts.

You may found more examples on http://absflow.westus.cloudapp.azure.com/

Generating RDF from YesWorkflow annotations

By using str_sum() function, all of the YesWorkflow annotations will be summariezed. In addition, by adding a argument of rdf=YW, a RDF file in turtle format will be generated in the same working directory of your R scripts.

Here is an example:

In addition, the sample RDF file is as follows:

The YesWorkflow annotation example can be found in following website: http://absflow.westus.cloudapp.azure.com/

And the annotations can generate a well-designed diagram of YesWorkflow: