[New Features] mindr supports tibble dataframes!

in utopian-io •  last year  (edited)

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: mindr: an R package that creates a markdown post out of a mind map. Thanks to the support from utopian.io!

  • What feature(s) did you add?

Weeks ago, a user asked me if mindr can create mindmaps out of tibble dataframes. After a lot of tests and efforts, now new features have been brought into the version 1.1.1: mindr can create mindmaps out of tibble dataframes.

Here is an example:

# firstly install the newest version of mindr
devtools::install_github("pzhaonet/mindr")
# load the package
library(mindr)
# a data example. suppose et2 is a column of a tibble dataframe
et2 <- c("/Root name", "/Path A", "/Path A/Product A", "/Path A/Product A/Process A", 
    "/Path A/Product A/Process A/Step A", "/Path A/Product A/Process A/Step A/Record 1", 
    "/Path A/Product A/Process A/Step A/Record 1/Analyses", 
    "/Path A/Product A/Process A/Step A/Record 1/Analyses/Object 1", 
    "/Path A/Product A/Process A/Step A/Record 1/Analyses/Object 1/Type: data source", 
    "/Path A/Product A/Process A/Step A/Record 1/Analyses/Object 1/Version: 3", 
    "/Path A/Product A/Process A/Step A/Record 1/Analyses/Object 2", 
    "/Path A/Product A/Process A/Step A/Record 1/Analyses/Object 3", 
    "/Path A/Product A/Process A/Step A/Record 1/Setup Parts", 
    "/Path A/Product A/Process A/Step A/Record 1/Setup Parts/Par 1", 
    "/Path A/Product A/Process A/Step A/Record 1/Setup Parts/Par 2", 
    "/Path A/Product A/Process A/Step A/Record 1/Setup Parts/Par 3", 
    "/Path B", "/Path C")
# convert the data into a mindmap
tree2mm(et2)

Then the users get a mindmap file "mindr.mm". Open it with any mindmap software, such as XMind:

Root name.jpg

  • How did you implement it/them?

Link to relevant lines in the code on GitHub is here.

I added a function tree2mm(), which extracts the titles from the tibble dataframe, and decides which levels they belong to. With the title and level information, it can be converted correctly into a mindmap.

Have fun!



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hi @dapeng, I see that the tree2mm() function was added in a commit made on Feb 19, 2018 (v1.1.1). When reviewing a post we only take commits into account that were made in the last 14 days. This means that the only eligible commits are this one and this one. Unfortunately these commits don't contain enough work for your contribution to be accepted - I hope you understand.


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

[utopian-moderator]

Thanks for your kind reply and careful check. Yes, the tree2mm() function was added in Feb., but it was not completely tested by the users, especially the ones who requested this feature, until several days ago I received the feedback from them. Then I made a minor improvement and announced this feature on utopian.io.

I wish my explanation could explain this contribution. If it still cannot be accepted, I surely understand. Thanks again.

這個應該好玩

很好玩