Bert Gollnick

Time and Date Handling

If you deal with datasets that contain date and time, these are usually imported as factors, which is not helpful for further processing. You need to apply some special measures to transform it to an R date object or to extract information like days, or hours. In this tuturial you will learn how this works.

Caesar Encryption

In ancient Rome Caesar used a simple encryption technique for secure communication. Later it was called Caesar cipher. We will implement it in R. For this we need to work with lists and make use of map() function.

Fibonacci and the Golden Ratio

Do you want to find out how many rabbits there are after x generations? Fibonacci found the mathematical number series that describes it. This series can be used for modeling other growth processes as well, e.g. plants. Besides this we learn its connection to Golden Ratio, and a lot about vectors handling.

Gauss Trick

Introduction When Carl Friedrich Gauss was a little boy his teacher asked the class to sum up all numbers from 1 to 100. Immediately he came up with the answer. How did he do this? We will find out.

List Handling

This tutorial provides a basic introduction to lists. It is shown how you can create a list and access its elements. The key concept of applying a function to each element of a list is explained based on purrr package with its map() function.

Prime Numbers

Introduction In this tutorial we will write a function that tests if a number is a prime number and find all prime number within 1 and 1000. Recap: a prime number is a number that is greater than one and has no positive divisors except one or itself. Objectives: function, control structures, sapply Requirements: none …

Prime Numbers Read More »

String Handling

We will learn to work with strings. For this we will analyse one of my favorite books: George Orwell’s 1984. Objectives: Learn string handling, e.g. functions grep(), gsub(), nchar(), strsplit(), and many more Requirements: None Import Luckily this book is available for download. The link is stored in variable “url” and the text is downloaded …

String Handling Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close