Press "Enter" to skip to content

Category: R

An Overview of Quarto for R Users

Nicola Rennie and Colin Gillespie provide an overview of Quarto:

Earlier this year, Posit (formerly RStudio) released Quarto. Quarto is an open-source scientific and technical publishing system that allows you to weave together narrative text and code to produce high-quality outputs including reports, presentations, websites, and more.

One of the main features of Quarto is that it isn’t just built for R. It’s language-agnostic. It can render documents that contain code written in R, Python, Julia, or Observable. That makes it incredibly useful if you work in multilingual teams, or collaborate with people who write in a different programming language from you. But what if you don’t use any other programming languages? What benefits does Quarto bring to people who only use R?

Read on to learn why you might want to use it over R Markdown.

Comments closed

Installing ML Services on SQL Server 2022

Tomaz Kastrun notices a change to the SQL Server installer:

Machine Learning Services and language extensions is available under Database Engine Services, and if you want to use any of these languages, check this feature. During the installation process, the R, Python or Java will not be installed (nor asked for permissions), but you will install your own runtime after the installation. This will bring you more convenience with the installation of different R/Python/Java runtimes.

Read on to see how you can install and work with languages like R, Python, and Java in SQL Server 2022.

Comments closed

Connecting to SQL Server from R

Thomas Williams makes a database call:

R code (including in R Markdown and Shiny) can connect to databases, for both reading and writing. This opens up a whole world of powerful analysis – however, it can sometimes be tricky to deal with drivers, error handling and closing connections. In this post, I’ll demonstrate how to connect to a SQL Server database and run a query; in part 2, I’ll cover some of the things you might want to do with the query results.

Click through for two common libraries and a few tips.

Comments closed

Fun with Decision Trees

Holger von Jouanne-Diedrich explains the value of decision trees, using predictive maintenance as an example:

Predictive Maintenance is one of the big revolutions happening across all major industries right now. Instead of changing parts regularly or even only after they failed it uses Machine Learning methods to predict when a part is going to fail.

If you want to get an introduction to this fascinating developing area, read on!

Click through for an example of how it works.

Comments closed

Making a Newsletter Template in R

Benjamin Smith’s ideas are intriguing to me and I wish to subscribe to his newsletter:

Jinja is a powerful templating engine that is useful in a variety of contexts. Recently, I discovered how its possible to use the power of Jinja syntax in R with the jinjar package written by David C Hall. With jinjar and the tidyRSS package by Robert Myles it is possible to make an email template that can provide short and informative updates. In his blog, I’m going to share how the jinjar and tidyRSS packages work and show how to combine them to make a simple daily email newsletter.

Read on to learn how.

Comments closed

Troubleshooting Caching in Shiny

Thomas Williams illuminates us on the caching process:

Caching in R Markdown is a valuable step to get your app, report or visualisation more production-ready. There are one or two potential issues to watch out for, especially when deploying a cache-enabled R Markdown file to a Shiny server – in this post I’ll go over some of these “gotchas”, and how you could address each one.

Click through for those three gotchas.

Comments closed

Swapping Integer Digits with R

Tomaz Kastrun shuffles things around:

The problem is described as:

Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-2^31, 2^31 – 1], then return 0.

For example:

x = 120; reversed_x = 21
x = -2310; reversed_x = -132

Read on to see how you can implement this in R.

Comments closed

Accessing Google Trends Data from R

Sebastian Sauer looks at Google search data:

You cannot download as much data as you like, there are some restrictions, again, from the same source as above:

Google has incorporated quota limits for Trends searches. This limits the number of search attempts available per user/IP/device. Details of quota limits have not yet been provided, but it may depend on geographical location or browser privacy settings. It has been reported in some cases that this quota is reached very quickly if one is not logged into a Google account before trying to access the Trends service.[52]

Click through to see how you can access this data. In this case, the example focuses on specific categories but there’s a lot more within Google Trends.

Comments closed

Learning to Count in R

Jerry Tuttle does the math:

You would think base R would have a count function such as count(df$Team) and count(df$Team == “NYY”) but this gives the error “could not find function ‘count’”. Base R does not have a count function. Base R has at last four ways to perform a count:

Click through to learn the different ways available to you, including those built into R itself as well as other packages like dplyr. H/T R-Bloggers.

Comments closed

Azure Synapse Analytics R Language Support

Ryan Majidimehr has a short list of updates for Azure Synapse Analytics but it includes a big one:

Azure Synapse Analytics provides built-in R support for Apache Spark. As part of this, data scientists can leverage Azure Synapse Analytics notebooks to write and run their R code. This also includes support for SparkR and SparklyR, which allows users to interact with Spark using familiar Spark or R interfaces. To learn more read the official how-to Use R for Apache Spark with Azure Synapse Analytics (Preview).

That it took this long for R support was a bit weird, but I’m glad it’s there now.

Comments closed