Press "Enter" to skip to content

Day: February 7, 2023

Diagnosing VSCode + R Integration Problems

John MacKintosh troubleshoots an issue:

I recently updated my R installation, and then realised that I’d broken my VSCode/ R set up in the process – I could not launch an R terminal either directly or via radian.

I have a repo where I’ve collated various blog posts relating to setting up VSCode for R, but that didn’t solve all my problems.

I did get it resolved eventually, and here’s how.

Read on for that resolution. H/T R-Bloggers.

Comments closed

Cumulative Measurement Functions in R

Steven P. Sanderson provides an overview of an R package:

If you’re looking for an easy-to-use package to calculate cumulative statistics in R, you may want to check out the TidyDensity package. This package offers several functions to calculate cumulative measurements, including mean, median, standard deviation, variance, skewness, kurtosis, harmonic mean, and geometric mean.

Click through for a quick description of each function, as well as examples of each. H/T R-Bloggers.

Comments closed

Working with Enumerations in Powershell

Patrick Gruenauer counts the ways:

The enum statement can be used to declare an enumeration. Microsoft describes this statement as follows:

The enum statement allows you to create a strongly typed set of labels. That enumeration can be used in the code without having to parse or check for spelling errors.

Click through for more description, as well as an example of how to create, instantiate, and operate on enumerations.

Comments closed

Unsupported Characters in Azure SQL DB Database Names

Nithya Bondalapati notes a discrepancy:

ARM (Azure Resource Manager) API does not support specific T-SQL resource naming formats and that’s why when Databases are created using T-SQL/SSMS, unsupported characters could get allowed into the names.
Azure Portal UI does not have this issue, because when you use Portal UI for creating a Database, the creation goes through ARM, and hence when unsupported characters are entered in the Name field, it immediately throws error, as shown in the below image.

None of the restrictions or onerous, but Nithya explains what actions fail or don’t quite work right if you have a database with special characters or ending in a period or space.

Comments closed

Plan Explorer Integration in SSMS 19

Andy Yun does us a solid:

If you’re like me, Plan Explorer has always been a must-have tool in your performance tuning arsenal. And one of the things that made it so useful was a simple little SSMS Integration that would allow you to right click on an Execution Plan and see “View with […] Plan Explorer.” 

Unfortunately, I started hearing reports of that no longer being available in SSMS v19. But I know a thing or two, so was willing to bet 30 minutes of time that I could get it back.

Andy won that bet, so shower him with accolades.

1 Comment

When to Use OPTIMIZE_FOR_SEQUENTIAL_KEY

Chad Callihan explains a feature:

If you’re running into problems caused by concurrent inserts and you’re on SQL Server 2019 or above, it’s worth testing out OPTIMIZE_FOR_SEQUENTIAL_KEY. This may alleviate those issues by handling inserts a little bit differently to reduce contention. OPTIMIZE_FOR_SEQUENTIAL_KEY will “control the rate at which new threads are allowed to request the latch, and favor threads that are likely to keep the throughput high.”

Read on to see how you can enable it but also when it makes sense to enable it.

Comments closed