No Clocks

No Clocks

Docker AI
Docker AI
"Learn how to streamline your workflow with Docker's AI-powered assistant."
·docs.docker.com·
Docker AI
Three experiments in LLM code assist with RStudio and Positron - Tidyverse
Three experiments in LLM code assist with RStudio and Positron - Tidyverse
We've been experimenting with LLM-powered tools to streamline R data science and package development.
Twice a year, the tidyverse team sets a week aside for “spring cleaning,” bringing all of our R packages up to snuff with the most current tooling and standardizing various bits of our development process. Some of these updates can happen by calling a single function, while others are much more involved. One of those more involved updates is updating erroring code, transitioning away from base R (e.g.  stop()), rlang (e.g.  rlang::abort()), glue, and homegrown combinations of them. cli’s new syntax is easier to work with as a developer and more visually pleasing as a user.
In some cases, transitioning is almost as simple as Finding + Replacing rlang::abort() to cli::cli_abort():
# before: rlang::abort("`save_pred` can only be used if the initial results saved predictions.") # after: cli::cli_abort("{.arg save_pred} can only be used if the initial results saved predictions.")
In others, there’s a mess of ad-hoc pluralization, paste0()s, glue interpolations, and other assorted nonsense to sort through:
Thus was born clipal1, a (now-superseded) R package that allows users to select erroring code, press a keyboard shortcut, wait a moment, and watch the updated code be inlined in to the selection.
clipal was a huge boost for us in the most recent spring cleaning. Depending on the code being updated, these erroring calls used to take 30 seconds to a few minutes. With clipal, though, the model could usually get the updated code 80% or 90% of the way there in a couple seconds. Up to this point, irritated by autocomplete and frustrated by the friction of copying and pasting code and typing out the same bits of context into chats again and again, I had been relatively skeptical that LLMs could make me more productive. After using clipal for a week, though, I began to understand how seamlessly LLMs could automate the cumbersome and uninteresting parts of my work.
clipal itself is now superseded by pal, a more general solution to the problem that clipal solved. I’ve also written two additional packages like pal that solve two other classes of pal-like problems using similar tools, ensure and gander. In this post, I’ll write a bit about how I’ve used a pair of tools in three experiments that have made me much more productive as an R developer
After using clipal during our spring cleaning, I approached another spring cleaning task for the week: updating testing code. testthat 3.0.0 was released in 2020, bringing with it numerous changes that were both huge quality of life improvements for package developers and also highly breaking changes. While some of the task of converting legacy unit testing code to testthat 3e is relatively straightforward, other components can be quite tedious. Could I do the same thing for updating to testthat 3e that I did for transitioning to cli? I sloppily threw together a sister package to clipal that would convert tests for errors to snapshot tests, disentangle nested expectations, and transition from deprecated functions like ⁠expect_known_*(). ⁠(If you’re interested, the current prompt for that functionality is here.) That sister package was also a huge boost for me, but the package reused as-is almost every piece of code from clipal other than the prompt. Thus, I realized that the proper solution would provide all of this scaffolding to attach a prompt to a keyboard shortcut, but allow for an arbitrary set of prompts to help automate these wonky, cumbersome tasks.
The next week, pal was born. The pal package ships with three prompts centered on package development: the cli pal and testthat pal mentioned previously, as well as the roxygen pal, which drafts minimal roxygen documentation based on a function definition. Here’s what pal’s interface looks like now:
ensure
While deciding on the initial set of prompts that pal would include, I really wanted to include some sort of “write unit tests for this function” pal. To really address this problem, though, requires violating two of pal’s core assumptions:
All of the context that you need is in the selection and the prompt. In the case of writing unit tests, it’s actually pretty important to have other pieces of context. If a package provides some object type potato, in order to write tests for some function that takes potato as input, it’s likely very important to know how potatoes are created and the kinds of properties they have. pal’s sister package for writing unit tests, ensure, can thus “see” the rest of the file that you’re working on, as well as context from neighboring files like other .R source files, the corresponding test file, and package vignettes, to learn about how to interface with the function arguments being tested.
The LLM’s response can prefix, replace, or suffix the active selection in the same file. In the case of writing unit tests for R, the place that tests actually ought to go is in a corresponding test file in tests/testthat/. Via the RStudio API, ensure can open up the corresponding test file and write to it rather than the source file where it was triggered from.3
gander
·tidyverse.org·
Three experiments in LLM code assist with RStudio and Positron - Tidyverse
Format SQL Queries
Format SQL Queries
A convenient interface for formatting SQL queries directly within R. It acts as a wrapper around the sql_format Rust crate. The package allows you to format SQL code with customizable options, including indentation, case formatting, and more, ensuring your SQL queries are clean, readable, and consistent.
·dataupsurge.github.io·
Format SQL Queries
Empty State Components for Shiny
Empty State Components for Shiny
Offers a comprehensive solution for managing empty states in Shiny applications. It provides tools to create both default and customizable components for scenarios where data is absent or doesn't match user-defined filters. The package prioritizes user experience, ensuring clarity and consistency even when data is not available to display.
·appsilon.github.io·
Empty State Components for Shiny
Rent Comp Survey Strategy for Multifamily Development — Tactica RES®
Rent Comp Survey Strategy for Multifamily Development — Tactica RES®
Picking the correct comp sets is one of the most crucial due diligence items a developer must take when determining if new multifamily construction is feasible. I will show you how to tackle critical questions by leveraging HelloData to produce and refine the rent comp survey to help populate a deve
·tacticares.com·
Rent Comp Survey Strategy for Multifamily Development — Tactica RES®
Multifamily Rent Comp Model — Tactica RES®
Multifamily Rent Comp Model — Tactica RES®
A descriptive tutorial blog post detailing Tactica's rental comp analysis template. The tool seamlessly takes raw rental data inputs and organizes and charts them into a visually stunning display that only requires a minimal time investment from the user.
·tacticares.com·
Multifamily Rent Comp Model — Tactica RES®
How to Find Rental Comps and Set Market Rents for Real Estate Investments | HelloData.ai
How to Find Rental Comps and Set Market Rents for Real Estate Investments | HelloData.ai
Whether it’s for a multifamily property or single-family rental (SFR), every rental property investor wants to collect the highest rent possible to maximize the value of their investment. But it can be difficult to find good sources of rental market data, and challenging to determine which properties are truly relevant rent comps for your investment.
·hellodata.ai·
How to Find Rental Comps and Set Market Rents for Real Estate Investments | HelloData.ai
Apartment Market Survey Excel Template Generator
Apartment Market Survey Excel Template Generator
Create a customized apartment market survey Excel template with AI in seconds. No Excel skills needed to get started.
·sourcetable.com·
Apartment Market Survey Excel Template Generator
Leasing Market Survey Template
Leasing Market Survey Template
Boost your leasing strategy with our dynamic Leasing Market Survey Template. Gather valuable insights on market trends, available space, and building preferences. Download our customizable docx file now!
·bizzlibrary.com·
Leasing Market Survey Template
4 Steps to Perform a Rent Survey for Your Investment Property
4 Steps to Perform a Rent Survey for Your Investment Property
If you're ready to take the next step with your apartment building investments, download ALL my resources for FREE at this link: https://themichaelblank.com/vault Getting a handle on the prevailing market rents is critical for the business plan of your rental or multifamily property. Your property’s rents may be under market, but how do you know
·themichaelblank.com·
4 Steps to Perform a Rent Survey for Your Investment Property
Metrics
Metrics
An image generator with 20+ metrics about your GitHub account such as activity, community, repositories, coding habits, website performances, music played, starred topics, etc. that you can put on your profile or elsewhere !
·metrics.lecoq.io·
Metrics
3MW (Using AI Functions With R & {ellmer})
3MW (Using AI Functions With R & {ellmer})
I show you how to equip LLMs with deterministic functions using R and {ellmer}. This equips your AI with key skills and reduces the risk of hallucinations.
·3mw.albert-rapp.de·
3MW (Using AI Functions With R & {ellmer})
Documenting functions
Documenting functions
The basics of roxygen2 tags and how to use them for documenting functions.
Examples @examples provides executable R code showing how to use the function in practice. This is a very important part of the documentation because many people look at the examples before reading anything. Example code must work without errors as it is run automatically as part of R CMD check. For the purpose of illustration, it’s often useful to include code that causes an error. You can do this by wrapping the code in try() or using \dontrun{} to exclude from the executed example code. For finer control, you can use @examplesIf: #' @examplesIf interactive() #' browseURL("https://roxygen2.r-lib.org")
Instead of including examples directly in the documentation, you can put them in separate files and use @example path/relative/to/package/root to insert them into the documentation. All functions must have examples for initial CRAN submission.
·roxygen2.r-lib.org·
Documenting functions