[R: New Features on mindr] Support LaTeX Equations. Conversion between .R scripts and .Rmd documents

in #utopian-io5 years ago (edited)

Repo

https://github.com/pzhaonet/mindr

Brief Intro and curriculum

'mindr' is an R package that can convert a markdown file or multiple markdown files, such as steem posts, into one mindmap. mindr can also convert a mindmap into a markdown file, which can be a good start of your post. A brief introduction can be found in one of my previous posts:

New Features

The new version 1.1.7 brings more exciting features.

mindr2.png

Figure 1. A mind map with LaTeX equations converted by mindr from a markdown file

  • Convert .R scripts into R markdown (.Rmd) or markdown (.md) documents, and vice versa, so that users can convert .R scripts into mind maps by using mindr.

    I added two functions to convert the following elements in .R scripts into R markdown documents.

    • code (.R) ---> code block (.Rmd, .md)
    • comments beginning with # ---> text body (.Rmd, .md)
    • comments beginning with markdown headings ---> headings (.Rmd, .md)

    Commit: new features: conversion between .R and .md/.Rmd

mindr1.jpg

Figure 2. Conversion between a .R script and a .Rmd file

GitHub Account

https://github.com/pzhaonet

Sort:  

Thanks for the contribution, @dapeng! Once again I think it's cool to see you implementing feature requested by people who actually use mindr - great stuff!

One thing I was wondering is if there is a linter you can use for R code? There are some minor inconsistencies that could probably be prevented by using a linter.


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you so much for your kind review, @amosbastian! Regarding the linter, there is a package lintr, which is already integrated into RStudio IDE, if my understanding is correct. 'mindr' works fine so far. The user's feedback is welcome, of course, if there appears any inconsistencies.

Have a nice weekend.

I meant more for linting for stylistic errors, e.g. not having a space before an opening curly bracket and stuff like that.

Hi @amosbastian! I guess that regular expressions can solve these possible problems as long as sufficient samples come in the future.

BTW, this post has not been upvoted by @utopian-io yet, but it has disappeared from utopian.rocks. It happened once with a previous post of mine. I was wondering if there is anything wrong. Am I in the blacklist or something like that? I don't think I broke any rules......

We have switched to a new voting bot (more information here) a couple of days ago. Unfortunately in this transition some posts will "expire" (reach 12 hours before payout) before the next voting round, so they are removed from the queue. You aren't on a blacklist or anything, it's even happened to one of my posts!

Thank you for letting me know, @amosbastian! Then it seems a good time to have a break from writing contribution posts until everything gets on the right track!

Thank you for your review, @amosbastian!

So far this week you've reviewed 5 contributions. Keep up the good work!

Hi @dapeng!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Coin Marketplace

STEEM 0.34
TRX 0.11
JST 0.034
BTC 66361.53
ETH 3253.14
USDT 1.00
SBD 4.43