Articles by rstats-tips.net

JSON, NULL values and as_tibble

September 6, 2024 | rstats-tips.net

When working with data provided by common APIs you will almost always get in contact with JSON formatted data. Using R’s rjson::fromJSON will transform JSON to R’s lists. So far so good. Converting those lists to tibble using tibble::as_tib... [Read more...]

Strange warning after loading own package

September 15, 2022 | rstats-tips.net

After upgrading my local R version to version 4.2.1 I always got an annoying warning after loading my own package. This only occurred using RStudio.
<span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span>
Warning message: In length(steps) == 0 || nchar(steps) == 0 : 'length(x) = 2 __ 1' in coercion to 'logical(1)' “Okay, that’s something new in R 4.2.0”, I thought and ... [Read more...]

Lists to Data.Frames with imap

February 16, 2022 | rstats-tips.net

When working with data which is a result of json-data converted to a list of lists of lists of lists … (you know what mean ;-)) I often want to convert it a data.frame. Unfortunately there’s often a list in the source data which is unnamed... [Read more...]

Accessing Snowflake with R

February 6, 2022 | rstats-tips.net

Snowflake is a well known cloud-based database. It’s used for Data Warehouses and other big data applications. In this article and the following ones I want to show how to setup and access a snowflake database from various clients such as R, Tableau and PowerBI. So let’s start ...
[Read more...]

Custom Formats in gt Tables

November 26, 2021 | rstats-tips.net

The “grammar of tables” is used to build tables with the R-package gt. Thomas Mock published an extension package called gtExtras which is used all over in tweets about NFL and Fantasy Football such as win and loss history information in a table. gt follows a similar philosophy such as ... [Read more...]

Working with tree-based hierarchies using data.tree

July 30, 2021 | rstats-tips.net

Lately I tried to visualize an hierarchy with Tableau Desktop. The problem was that the hierarchy had a variable depth because it was tree-based. Each row had an id and a parent_id. Normally hierarchies in Tableau are defined by pulling some fields together, such as product category, product group ... [Read more...]

Accessing PIWIK PRO from R

May 14, 2021 | rstats-tips.net

The main tool for tracking the action on a website is Google Analytics. But more and more websites switch to other tools such as Matomo or PIWIK PRO due to GDPR. My employer decided to switch to PIWIK PRO, too. So I was looking for a way to access the ... [Read more...]

Sorting German Numbers in DT datatable

April 22, 2021 | rstats-tips.net

DT::datatable() is a great way to show interactive tables in RMarkdown documents. (Unfortunately it’s a little bit tricky to use them with blogdown in combination with some hugo themes. But that’s another story.) The user can sort any column as he wants to. But it’s an ... [Read more...]

Splitting Linear Models

April 2, 2021 | rstats-tips.net

Last Thursday I watched Wolfgang Viechtbauer’s stream on Twitch. Wolfgang spoke about linear regression. (If you’re interested in the results: Wolfgang lists the R-code he wrote during the stream at https://www.wvbauer.com/doku.php/live_str...
[Read more...]
1 2

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)