Blog Archives

How to sort data by one or more columns with base R, dplyr and data.table

December 8, 2018
By

Introduction In this post in the R:case4base series we will examine sorting (ordering) data in base R. We will learn to sort our data based on one or multiple columns, with ascending or descending order and as always look at alternatives to base R, namely the tidyverse’s dplyr and data.table to show how we can achieve the same results. It is...

Read more »

How to work with strings in base R – An overview of 20+ methods for daily use.

November 24, 2018
By
How to work with strings in base R – An overview of 20+ methods for daily use.

Introduction In this post in the R:case4base series we will look at string manipulation with base R, and provide an overview of a wide range of functions for our string working needs. We will use simple examples to learn to perform basic string operations, concatenate strings, work with substrings, switch cases, quote, find and replace within strings and more. Some interesting...

Read more »

How to work with strings in base R – An overview of 20+ methods for daily use

November 24, 2018
By
How to work with strings in base R – An overview of 20+ methods for daily use

Introduction In this post in the R:case4base series we will look at string manipulation with base R, and provide an overview of a wide range of functions for our string working needs. We will use simple examples to learn to perform basic string operations, concatenate strings, work with substrings, switch cases, quote, find and replace within strings and more. Some interesting...

Read more »

4 ways to be more efficient using RStudio’s Code Snippets, with 11 ready to use examples

November 10, 2018
By
4 ways to be more efficient using RStudio’s Code Snippets, with 11 ready to use examples

Introduction In this post we will look at yet another productivity increasing feature of the RStudio IDE - Code Snippets. Code Snippets let us easily insert and potentially execute predefined pieces of code and work not just for R code, but many other languages as well. In this post we will cover 4 different ways to increase productivity using Code Snippets...

Read more »

4 ways to be more efficient using RStudio’s Code Snippets, with 11 ready to use examples

November 10, 2018
By
4 ways to be more efficient using RStudio’s Code Snippets, with 11 ready to use examples

Introduction In this post we will look at yet another productivity increasing feature of the RStudio IDE - Code Snippets. Code Snippets let us easily insert and potentially execute predefined pieces of code and work not just for R code, but many other languages as well. In this post we will cover 4 different ways to increase productivity using Code Snippets...

Read more »

How to perform merges (joins) on two or more data frames with base R, tidyverse and data.table

October 27, 2018
By
How to perform merges (joins) on two or more data frames with base R, tidyverse and data.table

Introduction In this post in the R:case4base series we will look at one of the most common operations on multiple data frames - merge, also known as JOIN in SQL terms. We will learn how to do the 4 basic types of join - inner, left, right and full join with base R and show how to perform the same with...

Read more »

How to perform merges (joins) on two or more data frames with base R, tidyverse and data.table

October 27, 2018
By
How to perform merges (joins) on two or more data frames with base R, tidyverse and data.table

Introduction In this post in the R:case4base series we will look at one of the most common operations on multiple data frames - merge, also known as JOIN in SQL terms. We will learn how to do the 4 basic types of join - inner, left, right and full join with base R and show how to perform the same with...

Read more »

How to import a directory of csvs at once with base R and data.table. Can you guess which way is the fastest?

October 13, 2018
By
How to import a directory of csvs at once with base R and data.table. Can you guess which way is the fastest?

Introduction Inspired by a recent post on how to import a directory of csv files at once using purrr and readr by Garrick, in this post we will try achieving the same using base R with no extra packages, and with data·table, another very popular package and as an added bonus, we will play a bit with benchmarking to see...

Read more »

How to import a directory of csvs at once with base R and data.table. Can you guess which way is the fastest?

October 13, 2018
By

Introduction Inspired by a recent post on how to import a directory of csv files at once using purrr and readr by Garrick, in this post we will try achieving the same using base R with no extra packages, and with data·table, another very popular package and as an added bonus, we will play a bit with benchmarking to see...

Read more »

4 ways to be more productive, using RStudio’s terminal

September 29, 2018
By
4 ways to be more productive, using RStudio’s terminal

Introduction RStudio version 1.1 introduced the Terminal functionality, which does not seem to be getting enough deserved attention and love even though it is very well integrated with the rest of the IDE and can be extremely useful for several daily use-cases. In this post we will try to cover 4 very common scenarios where the Terminal can be very useful...

Read more »

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)