Publications by tomaztsql

Little useless-useful R function – Psychedelic Square root with x11()

26.10.2020

Yes, the name of today’s function is wacky, because it gives you the flickering feeling when running it with x11() function. In addition is uses simple square root and cosine function to calculate the points in graph to give it psychedelic feeling. With the following code you can generate the function to draw the “carpet” patterns. Psyched...

958 sym R (545 sym/2 pcs) 4 img

Little useless-useful R function – Full moon finder

30.10.2020

Another one from the series [1,2,3,4] of useless functions. This one is particularly useful when you have overcast weather. And you are feeling moody, feel slightly off-balance and that causes you behaving erratically. The full moon function, or should we call it fool moon – due to it’s simplistic and approximate nature, calculates the the...

2020 sym R (1116 sym/2 pcs) 6 img

Little useless-useful R functions – R Lorem Ipsum

02.11.2020

Lorem Ipsum is simply dummy text of the printing and typesetting industry and extensively popularized in the past 60 years. It’s main purpose it more than obvious, in addition the fact is that a reader is not distracted by readable content and is focusing on layout, outlook or design of a page (or specimen). Idea is to have a Lorem Ipsum text ...

1519 sym R (896 sym/3 pcs) 8 img

Little useless-useful R functions – Wacky Password generator

06.11.2020

Generating password is a hustle and I don’t want to go into the philosophy of passwords. Strong password, lengthy password, automatically generated password, etc. For me, they are all hard to remember, even harder to type (due to typos, different language setups, OS, software, etc.). In return, let’s have another useless R function, that will...

1724 sym R (1009 sym/2 pcs) 8 img

Little useless-useful R functions – Play rock-paper-scissors with your R engine

13.11.2020

Naaah! not a joke. But quarantine restrictions are getting tighter and you might want to spent playing some useless game with your R engine, whilst programming, doing machine learning or other learning. Source: Creative Commons Without complications, the simplest version of this game is to play against R Engine. Here is how to: ##### Input bet ...

1182 sym R (732 sym/2 pcs) 8 img

Little useless-useful R functions – Same function names from different packages or namespaces

18.11.2020

This little useless-useful R function is not that useless after-all. Many of the R programmers have had some issues with namespaces in R environment and lost some time debugging, that turned out to be due to variable name or function name. Let’s make a simple example: c <- 100 a <- c(a,c) a So it looks like two variables names “a” and ...

2090 sym R (934 sym/2 pcs) 6 img

Little useless-useful R functions – Making scatter plot from an image

21.11.2020

Taking a jpg image and converting it to raster, getting pixelized data manipulation of the image and plot a scatter image. Sound like another useless R function, that can produce a scatter plot in a shape of a logo with a smooth curve. Example with Amazon logo So the function is using the image manipulation part: img <- magick::image_read("image/...

968 sym R (1122 sym/3 pcs) 10 img

Little useless-useful R functions – Script that generates calculator script

30.11.2020

This time the simple useless function will generate a long list of IF clauses that will in fact return the result of a mathematical operation between two numbers. This is not by no means any type of automatic generation of code, not a script, that will write itself. The concept is fairly simple. Create a function that will return the results of...

1789 sym R (1110 sym/3 pcs) 6 img 1 tbl

Using multi languages Azure Data Studio Notebooks

01.12.2020

Using multiple languages is a huge advantages when people choose notebooks over standard code files. And with notebooks in Azure Data Studio without switching the kernels, you can stay on one and work your code by using following functions for switching. %%lang_r %%lang_py First, installing the Azure Data Studio . In addition, you can decide on...

1755 sym R (19 sym/1 pcs) 6 img

Advent of 2020, Day 1 – What is Azure DataBricks

01.12.2020

Azure Databricks is a data analytics platform (PaaS), specially optimised for Microsoft Azure cloud platform. Databricks is an enterprise-grade platform service that is unified for data lake architecture for large analytical operations. Azure Databricks combines: large scale data processing for batch loads and streaming datasimplifies and accele...

2308 sym 4 img