- Introduction
- Installation
- Adding YesWorkflow annotations in R scripts
- Generating RDF from YesWorkflow annotations
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 forProvONE
entity types.
- NEW: The
- 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.
You can install the package from GitHub.
# install.packages("devtools")
devtools::install_github("XiaoliangJiang/IndependentStudy2017YW")
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/
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: