pkgdown
Generate static html documentation for an R package
pkgdown is a tool that automatically generates websites for R packages. It converts your package documentation, README, and vignettes into a formatted website.
The package streamlines documentation by transforming existing package components into web pages without requiring manual HTML creation. It integrates with GitHub Actions for automated deployment and uses Bootstrap 5 for modern styling. Over 12,000 R packages currently use pkgdown to make their documentation more accessible and discoverable online.
Contributors#
Resources featuring pkgdown#
Using R package structure for data science projects | Kylie Ainslie | Data Science Lab
The Data Science Lab is a live weekly call. Register at pos.it/dslab! Discord invites go out each week on lives calls. We’d love to have you!
The Lab is an open, messy space for learning and asking questions. Think of it like pair coding with a friend or two. Learn something new, and share what you know to help others grow.
On this call, Libby Heeren is joined by Kylie Ainslie who walks through how structuring data science projects as R packages provides a consistent framework that integrates documentation for you and facilitates collaboration with others by organizing things really well. Kylie says, “I stumbled on using an R package structure to organize my projects a number of years ago and it has changed how I work in such a positive way that I want to share it with others! In a world where our attention is constantly being pulled in many directions, efficiency is crucial. Structuring projects as R packages is how I work more efficiently.”
Hosting crew from Posit: Libby Heeren, Isabella Velasquez
Kylie’s Bluesky: @kylieainslie.bsky.social Kylie’s LinkedIn: https://www.linkedin.com/in/kylieainslie/ Kylie’s Website: https://kylieainslie.github.io/ Kylie’s GitHub: https://github.com/kylieainslie
Resources from the hosts and chat:
posit::conf(2026) call for talks: https://posit.co/blog/posit-conf-2026-call-for-talks/ Kylie’s posit::conf(2025) talk: https://www.youtube.com/watch?v=YzIiWg4rySA {usethis} package: https://usethis.r-lib.org/ R Packages (2e) book: https://r-pkgs.org/ Paquetes de R (R Packages in Spanish): https://davidrsch.github.io/rpkgs-es/ {box} package: https://github.com/klmr/box extdata docs in Writing R Extensions: https://cran.r-project.org/doc/manuals/R-exts.html#Data-in-packages-1 Tan Ho’s talk on NFL data: https://tanho.ca/talks/rsconf2022-github/ {rv} package: https://a2-ai.github.io/rv-docs/ Whether to Import or Depend: https://r-pkgs.org/dependencies-mindset-background.html#sec-dependencies-imports-vs-depends {pkgdown} package: https://pkgdown.r-lib.org/ Edgar Ruiz’s {pkgsite} package: https://github.com/edgararuiz/pkgsite
Attendees shared examples of data packages in the chat! Here they are: https://kjhealy.github.io/nycdogs/ https://kjhealy.github.io/gssr/ https://github.com/deepshamenghani/richmondway https://github.com/kyleGrealis/nascaR.data https://github.com/ivelasq/leaidr
► Subscribe to Our Channel Here: https://bit.ly/2TzgcOu
Follow Us Here: Website: https://www.posit.co The Lab: https://pos.it/dslab Hangout: https://pos.it/dsh LinkedIn: https://www.linkedin.com/company/posit-software Bluesky: https://bsky.app/profile/posit.co
Thanks for learning with us!
Timestamps: 00:00 Introduction 06:17 Reviewing the disorganized project example 10:01 Creating the package structure using create_package 17:50 Organizing external data and scripts in the inst folder 22:55 Adding a README and License 29:06 “What are the advantages to packaging a project?” 33:35 Writing Roxygen2 documentation 36:06 “Do you type return at the end of your functions?” 41:55 Handling dependencies with use_package 43:53 “Can you just use require(dplyr) at the top?” 47:45 Setting up a pkgdown site 50:11 Creating vignettes 52:22 “What is the role of the usethis package?” 54:18 Loading the package with devtools::load_all

Company Branding Workflow Demo Live Q&A - February 26th
Hi, there! If you started here first, please refer back to the Demo: https://youtu.be/U48y0_yzEPY
This Q&A Session followed a workflow demo on “how to apply consistent company branding across reports, dashboards, and apps”
Key Links:
- GitHub Repo for Example: https://github.com/skaltman/brand-yml-demo
- brand.yml GitHub repo: https://posit-dev.github.io/brand-yml/
- Follow-along blog post: https://posit.co/blog/unified-branding-across-posit-tools-with-brand-yml/
Additional Resources Mentioned in Q&A:
- Quarto specific page on brand: https://quarto.org/docs/authoring/brand.html
- Typography: https://posit-dev.github.io/brand-yml/brand/typography.html
- brand.yml + pkgdown: https://github.com/rstudio/bslib/tree/main/pkgdown
- LLM brand.yml prompt: https://posit-dev.github.io/brand-yml/articles/llm-brand-yml-prompt/
- Inspiration/gallery: https://posit-dev.github.io/brand-yml/inspiration/
Please note, the main demo will be here: https://youtu.be/U48y0_yzEPY?feature=shared
If you’d like to ask questions anonymously, you can use: https://pos.it/demo-questions
Company-branded reports, apps, and dashboards made easier with brand.yml & Posit
You will learn: How to apply consistent company branding across reports, dashboards, and apps
Key Links:
- GitHub Repo for Example: https://github.com/skaltman/brand-yml-demo
- brand.yml GitHub repo: https://posit-dev.github.io/brand-yml/
- Follow-along blog post: https://posit.co/blog/unified-branding-across-posit-tools-with-brand-yml/
- Q&A after the Demo: https://youtube.com/live/kuEbRfmm4G4?feature=share
Additional Resources Mentioned in Q&A:
- Quarto specific page on brand: https://quarto.org/docs/authoring/brand.html
- Typography: https://posit-dev.github.io/brand-yml/brand/typography.html
- brand.yml + pkgdown: https://github.com/rstudio/bslib/tree/main/pkgdown
- LLM brand.yml prompt: https://posit-dev.github.io/brand-yml/articles/llm-brand-yml-prompt/
- Inspiration/gallery: https://posit-dev.github.io/brand-yml/inspiration/
Why we think this is important: Consistent company branding in your reports and apps (with your logo, colors, and fonts) can help make your work look more professional, but are often tricky to get right.
Common challenges we’ve heard from the community:
- Excessive manual effort: Applying colors, fonts, and logos across reports, apps, and dashboards takes time and is prone to errors.
- Difficult to update: When brand guidelines change, it’s difficult to update all products consistently.
- Team consistency: Ensuring all contributors follow branding guidelines is challenging to manage.
How to join future events: We host workflow demos the last Wednesday of every month. You can add them to your calendar with this link: https://www.addevent.com/event/Eg16505674
Full playlist of workflow demo recordings: https://www.youtube.com/playlist?list=PL9HYL-VRX0oRsUB5AgNMQuKuHPpNDLBVt
Have suggestions? Comment below.
Thank you for joining us!
Hadley Wickham - R in Production
R in Production by Hadley Wickham
Visit https://rstats.ai for information on upcoming conferences.
Abstract: In this talk, we delve into the strategic deployment of R in production environments, guided by three core principles to elevate your work from individual exploration to scalable, collaborative data science. The essence of putting R into production lies not just in executing code but in crafting solutions that are robust, repeatable, and collaborative, guided by three key principles:
-
Not just once: Successful data science projects are not a one-off, but will be run repeatedly for months or years. I’ll discuss some of the challenges for creating R scripts and applications that run repeatedly, handle new data seamlessly, and adapt to evolving analytical requirements without constant manual intervention. This principle ensures your analyses are enduring assets not throw away toys.
-
Not just my computer: the transition from development on your laptop (usually windows or mac) to a production environment (usually linux) introduces a number of challenges. Here, I’ll discuss some strategies for making R code portable, how you can minimise pain when something inevitably goes wrong, and few unresolved auth challenges that we’re currently working on.
-
Not just me: R is not just a tool for individual analysts but a platform for collaboration. I’ll cover some of the best practices for writing readable, understandable code, and how you might go about sharing that code with your colleagues. This principle underscores the importance of building R projects that are accessible, editable, and usable by others, fostering a culture of collaboration and knowledge sharing.
By adhering to these principles, we pave the way for R to be a powerful tool not just for individual analyses but as a cornerstone of enterprise-level data science solutions. Join me to explore how to harness the full potential of R in production, creating workflows that are robust, portable, and collaborative.
Bio: Hadley is Chief Scientist at Posit PBC, winner of the 2019 COPSS award, and a member of the R Foundation. He builds tools (both computational and cognitive) to make data science easier, faster, and more fun. His work includes packages for data science (like the tidyverse, which includes ggplot2, dplyr, and tidyr)and principled software development (e.g. roxygen2, testthat, and pkgdown). He is also a writer, educator, and speaker promoting the use of R for data science. Learn more on his website, http://hadley.nz .
Mastodon: https://fosstodon.org/@hadleywickham
Presented at the 2024 New York R Conference (May 17, 2024) Hosted by Lander Analytics (https://landeranalytics.com )

It’s a Great Time to be an R Package Developer! - posit::conf(2023)
Presented by Jenny Bryan and Hadley Wickham
(Due to unforeseen circumstances, Hadley Wickham presented this talk “slide karaoke” style, from materials prepared by Jenny Bryan.)
In R, the fundamental unit of shareable code is the package. As of March 2023, there were over 19,000 packages available on CRAN. Hadley Wickham and I recently updated the R Packages book for a second edition, which brought home just how much the package development landscape has changed in recent years (for the better!).
In this talk, I highlight recent-ish developments that I think have a great payoff for package maintainers. I’ll talk about the impact of new services like GitHub Actions, new tools like pkgdown, and emerging shared practices, such as principles that are helpful when testing a package.
Presented at Posit Conference, between Sept 19-20 2023, Learn more at posit.co/conference.#
Talk Track: Package development. Session Code: TALK-1132


Thanks, I Made It with Quartodoc - posit::conf(2023)
Presented by Isabel Zimmerman
When Python package developers create documentation, they typically must choose between mostly auto-generated docs or writing all the docs by hand. This is problematic since effective documentation has a mix of function references, high-level context, examples, and other content.
Quartodoc is a new documentation system that automatically generates Python function references within Quarto websites. This talk will discuss pkgdown’s success in the R ecosystem and how those wins can be replicated in Python with quartodoc examples. Listeners will walk away knowing more about what makes documentation delightful (or painful), when to use quartodoc, and how to use this tool to make docs for a Python package.
Presented at Posit Conference, between Sept 19-20 2023, Learn more at posit.co/conference.#
Talk Track: Data science with Python. Session Code: TALK-1139

Kelly O’Briant | Building a business case for data science & advocating for analytic infrastructure
3:10 - Start of Kelly’s presentation 5:05 - Identifying where you are in your organizational culture when asking for change 9:30 - What is analytic infrastructure: the how, where, and with what that goes into your daily data science work 10:55 - Production looks different at different organizations 12:20 - Don’t get caught up in the hype - there is no perfect deployment pipeline 14:00 - Tactical metrics for communicating devops - code deployment lead time 15:55 - Your analytic infrastructure is what enables you or teams to deliver value through decreasing that code deployment lead time 20:49 - What is an analytic administrator / R Admin? (A data scientist who onboards new tools, deploys solutions, support existing standards. They work closely with IT to maintain and scale analytic environments. They influence others in the organization to be more effective, and are passionate about making data science a legitimate analytic standard) 24:04 - Building a business case (introducing rstudio.com/champion)
Join us for future champion chats the 4th Monday of every month (not the date I said in the recording) rstd.io/champion-chats
Let’s admit it. Getting to use the tools you want sometimes needs a little convincing.
We’ve had the opportunity to meet so many wonderful people from the community. People that: organize meetups in their own communities, spend time after-hours teaching their co-workers, solve business problems at work with Shiny, write blog posts to help others, and so much more..
People are doing amazing things with data science, yet so many are still in a position where they are not able to make the case for it at their own organizations.
Hear from Kelly O’Briant on how you can start to navigate the internal process and advocate for great analytic infrastructure as a data scientist.
Whether you’re getting pushback about using open-source, being told to use a BI tool instead, or just unable to find the other data scientists at your company - we want to help make this process less frustrating. Come hang out and chat with us!
*Please note, only the presentation portion of this meetup was recorded, the open discussion and Q&A was not.
Resources shared this week: ⬢ rstudio.com/champion ⬢ John shared a typology of organisational cultures: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1765804/pdf/v013p0ii22.pdf ⬢ Kelly shared The Phoenix Project book: https://www.amazon.com/Phoenix-Project-DevOps-Helping-Business-ebook/dp/B078Y98RG8 and The Unicorn Project book: https://www.amazon.com/gp/product/B07QT9QR41 ⬢ Kelly shared Benjy’s talk on conveying data science findings to non-experts: https://www.youtube.com/watch?v=UUIda4-CSXQ ⬢ Nick shared: The pkgdown package can be used to build informational web pages about R packages, which can themselves be deployed to RStudio Connect: https://pkgdown.r-lib.org/ ⬢ Kelly shared Nathan Stephens RViews blog on Analytics Administration for R: https://rviews.rstudio.com/2017/06/21/analytics-administration-for-r/
Carson Sievert || Customizing Navigation Items in Shiny using {bslib} || RStudio
00:00 Introduction 00:15 Linking inside navbarPage 01:19 Replacing tabPanel with navbarPage, and navbarMenu 02:32 nav_spacer() 03:41 Adding header and//or footer content 04:07 Replacing tabsetPanel with navs_tab and navs_pill 04:32 navs_tab_card() and navs_pill_card() variants 04:40 Demo of all of the nav_*() functions
The bslib R package provides tools for customizing Bootstrap themes directly from R, making it much easier to customize the appearance of Shiny apps & R Markdown documents. bslib’s primary goals are:
- To make custom theming as easy as possible.
- Custom themes may even be created interactively in real-time.
- Also provide easy access to pre-packaged Bootswatch themes.
- Make upgrading from Bootstrap 3 to 4 (and beyond) as seamless as possible. (Shiny and R Markdown default to Bootstrap 3 and will continue to do so to avoid breaking legacy code.)
- Serve as a general foundation for Shiny and R Markdown extension packages. (Extensions such as flexdashboard, pkgdown, and bookdown already fully support bslib’s custom theming capabilities.)
You can read more about bslib here: https://rstudio.github.io/bslib/articles/bslib.html And you can learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Carson Sievert (@cpsievert) Design & editing: Jesse Mostipak (@kierisi)

Hadley Wickham | testthat 3.0.0 | RStudio (2020)
In this webinar, I’ll introduce some of the major changes coming in testthat 3.0.0. The biggest new idea in testthat 3.0.0 is the idea of an edition. You must deliberately choose to use the 3rd edition, which allows us to make breaking changes without breaking old packages. testthat 3e deprecates a number of older functions that we no longer believe are a good idea, and tweaks the behaviour of expect_equal() and expect_identical() to give considerably more informative output (using the new waldo package).
testthat 3e also introduces the idea of snapshot tests which record expected value in external files, rather than in code. This makes them particularly well suited to testing user output and complex objects. I’ll show off the main advantages of snapshot testing, and why it’s better than our previous approaches of verify_output() and expect_known_output().
Finally, I’ll go over a bunch of smaller quality-of-life improvements, including tweaks to test reporting and improvements to expect_error(), expect_warning() and expect_message().
Webinar materials: https://rstudio.com/resources/webinars/testthat-3/
About Hadley: Hadley Wickham is the Chief Scientist at RStudio, a member of the R Foundation, and Adjunct Professor at Stanford University and the University of Auckland. He builds tools (both computational and cognitive) to make data science easier, faster, and more fun. You may be familiar with his packages for data science (the tidyverse: including ggplot2, dplyr, tidyr, purrr, and readr) and principled software development (roxygen2, testthat, devtools, pkgdown). Much of the material for the course is drawn from two of his existing books, Advanced R and R Packages, but the course also includes a lot of new material that will eventually become a book called “Tidy tools”

