Logo

How to find out which package version is loaded in R?

You can directly query a specific package’s installed version:

packageVersion("dplyr")

This usually reflects the same version that is currently loaded, unless multiple versions are installed and you specifically loaded a different one.

Using sessionInfo()

Running sessionInfo() shows a breakdown of all packages actively loaded (under “other attached packages” or “loaded via a namespace”). This confirms the exact version running in your current R session.

Using installed.packages()

installed.packages() lists every package and version available in your R library, though it doesn’t tell you which version is actively loaded in your session if multiple versions exist.

Next Steps for Interview Prep and Beyond

If you’re refining your technical skills for interviews, Grokking the Coding Interview: Patterns for Coding Questions can help you master common problem-solving patterns. Strengthen your algorithmic foundations with Grokking Data Structures & Algorithms for Coding Interviews. For scalable system design insights, explore Grokking System Design Fundamentals. You can also book a Coding Mock Interview with ex-FAANG engineers for personalized feedback. Finally, visit the DesignGurus.io YouTube channel for concise tutorials.

CONTRIBUTOR
TechGrind