KnitR is package for the RStudio, which allows to produce word processing documents, PDF, presentations,... with real-time embedding of data. E.g. current stock exchange rates can be fetched, analysed within R and, dependent on the analysis' results, may be inserted into the text.
The package KnitR is often used within RStudio as a graphical user interface for calling commands and scripts for the underlying statistic software R (see Wikipedia:Knitr for details).
From the command line up to date reports can be generated automatically by processing a R-Markdown document and at processing time the current data sources (e.g. monitoring data) is evaluated in the statistical or numerical analysis.
If learners are able to see the R-Code in the learning document they can perform activities in the software for statistics on their own. Furthermore for research publications in the Wikiversity[1] readers can
reproduce the results,
learn from the methodology,
apply the R-code on their own data,
check if the algorithm are appropriate for experimental design
In the previous section the workflow of a integrated approach of KnitR was elaborated. Due to the fact that this concept is not implemented yet as extension in MediaWiki yet, the workflow cannot performed with code chunk for mathematical calculations in the MediaWiki of Wikiversity directly. But it possible to learn about the workflow in general:
Advanced Learners/Spatial Analysis: Apply a scenario in the Risk Management Module for creating Risk Maps. What are additional requirements for the spatial analysis?
extract data from GIS database process spatial data with R-script,
integrate generated maps and calculated R results in the KnitR document (Spatial Analysis with R Youtube published by Domino Data Lab 2016/02).
(Jupyter) Analyse the Open Source framework Jupyter and analyse the difference and similarities between KnitR and Jupyter. When will you use KnitR and when would you use Jupyter.
Analyse the COVID-19 outbreak and the requirements of dynamic updates in 2020. What are the requirements and constraints to create a dynamic report mechanism based on KnitR and R for the COVID-19 epidemics.
Explore the concept of Scientific Hackathon and explain why KnitR can be used as a development environment for decision support products!
(KnitR Templates) Create a KnitR template that loads input data from a dataset input.csv calls a process_data(...) function and creates an output.csv for processed data. Include some of source data and aggregated source data in the R-Markdown.
The OpenSource tool PanDoc is called the "swiss army knife" of document conversion. Assume we have a KnitR document of a scientific paper that contains the KnitR code chunks for processing the data, that was analysed.
converted the Markdown document of the paper with PanDoc-Online Converter in a MediaWiki document.
Create a sample document with the knitr-package in RStudio and save the R-Markdown file with the extension Rmd to your harddrive.
press Convert-button and analyze the generated MediaWiki syntax of the text.
The R-Code chunks for the analysis of the data (e.g. loaded from CSV file of spreadsheet document) is converted into a <code>-environment.
This converted KnitR document is stored together with the scientific papers in the WikiJournal (e.g. WikiJournal of Medicine). If sampling of data was performed in the same way the application of the KnitR-document with the new data will be performed in the same algorithmic way. This KnitR-approach contributes to a workflow for Reproducible Science.
HTML5 Processing of MediaWiki Markdown Acticles - First milestone - access to MediaWiki source text in a HTML document with Javascript - example shows download of Wikiversity:Swarm Intelligence in a textarea of a HTML file.
↑WikiJournal of Medicine - An open access journal with no publication costs – About ISSN: 2002-4436 www.WikiJMed.org Frequency: Continuous Since: March 2014 Publisher: Wikimedia Foundation
↑guru99-edu Github User (2019) R-Programming respository with R sample data in CSV format for learning R - URL: https://github.com/guru99-edu/R-Programming - retrieved 2024/05/06