Little useless-useful R functions – Function for faster reading with Bionic Reading

Trick your brain into faster reading with the help of Bionic Reading. With the help of highlighting part of the words, it “guides your eyes over the text and the brain remembers previously learned words more quickly.” (source: br-about)

Here is a beautiful example of how text with the use of opacity, colours, size and many other elements can be quickly achieved for faster reading.

The vanilla output of the R language is slightly limited in terms of output in R Studio, but it can be done using some colours and text size. For the sample text, I will use the one from the image:

sample_text <- "
Bionic Reading is a new method 
facilitating the reading process
by guiding the eyes through 
text with artificial fixation points.

As a result, the reader is only 
focusing on the highlighted 
initial letters and lets the brain 
center complete the word.

In a digital world dominated 
by shallow forms of reading,
Bionic Reading aims to 
encourage a more in-depth 
reading and understanding 
of written content.
"

And the function is straightforward:

Make_text_easier_to_read <- function(input_text){
  
  bold <- "\033[1m"
  underline <- "\033[4m"
  reset <- "\033[0m"
  blue <- "\033[34m"

  modify_word <- function(word) {
    word_length <- nchar(word)
    first_half <- substr(word, 1, ceiling(word_length / 2))
    first_half_bold <- paste0(bold, first_half, reset)
    second_half <- substr(word, ceiling(word_length / 2)+1, word_length)
    second_half_bold <- paste0(blue, second_half, reset)
    final_word <- paste0(first_half_bold, second_half_bold)
    return(final_word)
  }
  
    words <- unlist(strsplit(sample_text, " "))
    modified_words <- sapply(words, modify_word)
    formatted_text <- paste(modified_words, collapse = " ")
    cat(formatted_text, "\n")
}

For the comparison of the text, here is an example:

#simple text
cat("\033[34m", sample_text, "\033[0m", "\n")

# run the function
Make_text_easier_to_read(sample_text)

On the left-hand side is the normal text and on the right-hand side are the bolded parts of the words for faster reading.

As always, the complete code is available on GitHub in  Useless_R_function repository. The sample file in this repository is here (filename: Bionic_reading.R). Check the repository for future updates.

Happy R-coding and stay healthy!

Disclaimer: This blog post has not been sponsored by the owners of the product or patent. It is also not affiliated with the company. I personally like the concept and idea, and therefore, I decided to write the function. If you wish to download their product, here is the link!

Tagged with: , , , , ,
Posted in R, Uncategorized, Useless R functions
2 comments on “Little useless-useful R functions – Function for faster reading with Bionic Reading
  1. Cody Custis says:

    Am I the only person who sees Bionic Reading and gets an internal monologue in William Shatner random pauses?

    Checked out the About page (https://bionic-reading.com/br-about/). After the pile of blurb points that could have been written by a Temu bot (“More knowledge will make you more successful and give you the significant advantage in this noisy and hectic world.”), gave up on looking for any evidence that it actually increases reading speed / comprehension.

    Like

  2. […] Tomaz Kastrun says reading is fundamental: […]

    Like

Leave a comment

Follow TomazTsql on WordPress.com
Programs I Use: SQL Search
Programs I Use: R Studio
Programs I Use: Plan Explorer
Rdeči Noski – Charity

Rdeči noski

100% of donations made here go to charity, no deductions, no fees. For CLOWNDOCTORS - encouraging more joy and happiness to children staying in hospitals (http://www.rednoses.eu/red-noses-organisations/slovenia/)

€2.00

Top SQL Server Bloggers 2018
TomazTsql

Tomaz doing BI and DEV with SQL Server and R, Python, Power BI, Azure and beyond

Discover WordPress

A daily selection of the best content published on WordPress, collected for you by humans who love to read.

Revolutions

Tomaz doing BI and DEV with SQL Server and R, Python, Power BI, Azure and beyond

tenbulls.co.uk

tenbulls.co.uk - attaining enlightenment with the Microsoft Data and Cloud Platforms with a sprinkling of Open Source and supporting technologies!

SQL DBA with A Beard

He's a SQL DBA and he has a beard

Reeves Smith's SQL & BI Blog

A blog about SQL Server and the Microsoft Business Intelligence stack with some random Non-Microsoft tools thrown in for good measure.

SQL Server

for Application Developers

Business Analytics 3.0

Data Driven Business Models

SQL Database Engine Blog

Tomaz doing BI and DEV with SQL Server and R, Python, Power BI, Azure and beyond

Search Msdn

Tomaz doing BI and DEV with SQL Server and R, Python, Power BI, Azure and beyond

R-bloggers

Tomaz doing BI and DEV with SQL Server and R, Python, Power BI, Azure and beyond

R-bloggers

R news and tutorials contributed by hundreds of R bloggers

Data Until I Die!

Data for Life :)

Paul Turley's SQL Server BI Blog

sharing my experiences with the Microsoft data platform, SQL Server BI, Data Modeling, SSAS Design, Power Pivot, Power BI, SSRS Advanced Design, Power BI, Dashboards & Visualization since 2009

Grant Fritchey

Intimidating Databases and Code

Madhivanan's SQL blog

A modern business theme

Alessandro Alpi's Blog

DevOps could be the disease you die with, but don’t die of.

Paul te Braak

Business Intelligence Blog

Sql Insane Asylum (A Blog by Pat Wright)

Information about SQL (PostgreSQL & SQL Server) from the Asylum.

Gareth's Blog

A blog about Life, SQL & Everything ...