Blog Archives

Verbose data.table and uncovering hidden cedta’s data table awareness decisions

February 16, 2019
By
Verbose data.table and uncovering hidden cedta’s data table awareness decisions

Introduction When speed and memory efficiency is important, the data.table package is one of the ways to improve those aspects of our R code dramatically. Including data.table in a package also comes with the added benefit of only importing the methods package, which is part of base R. We must also however pay attention to correctly importing and using methods,...

Read more »

R Markdown: 3 sources of reproducibility issues and options how to tackle them

February 2, 2019
By
R Markdown: 3 sources of reproducibility issues and options how to tackle them

Introduction R Markdown is a great tool to use for creating reports, presentations and even websites that contain evaluated and rendered code. This can help us immensely when presenting data science type of work to audiences, while still being able to version control the content creation process. One of the challenges that stay is reproducibility of the rendered results. In this...

Read more »

Create R Markdown reports and presentations even better with these 3 practical tips

January 19, 2019
By
Create R Markdown reports and presentations even better with these 3 practical tips

Introduction Including R Markdown in the workflow for presenting and publishing analyses that use code in R or other languages is a great way to make presentations, dashboards or reports good looking, reproducible and version controllable. In this post, we will look at three simple ways to improve that workflow even further with methods that are lesser known and can make...

Read more »

Here’s why 2019 is a great year to start with R: A story of 10 year old R code then and now

January 5, 2019
By
Here’s why 2019 is a great year to start with R: A story of 10 year old R code then and now

Introduction It has been more than ten years since I wrote my first R code. And in those years, the R world has changed dramatically, and mostly to the better. I believe that the current time may be one of the best times to start working with R. In this new year’s post we will look at the R world 10...

Read more »

5 amazing free tools that can help with publishing R results and blogging

December 22, 2018
By
5 amazing free tools that can help with publishing R results and blogging

Introduction It is Christmas time! And what better time than this to write about the great tools that are available to all who like R and would like to publish their R work or even blog about it. This post is meant as a praise to the tools that are...

Read more »

R:case4base – Sorting data with base R

December 8, 2018
By
R:case4base – Sorting data with base R

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 »

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 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 »

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)