CPDSE CPDSE R for Pharmacy
  • Home
  • Getting Started
  • Functions
    • All Functions

    • Import & Create
    • read_csv( )
    • tibble( )

    • Transform
    • mutate( )

    • Report
    • cat( )
    • round( )
    • signif( )
  • Glossary
  • Coding Conventions

R for Pharmacy

R references for pharmaceutical sciences practicals. Written for learners — plain language, tidyverse style, pharmacy examples.

Get Started Browse Functions

TipNo installation required

Most code blocks on this site are interactive. Click Run Code to execute them right here in your browser — no R or RStudio installation needed.

Topics covered

🚀

Getting Started

Set up R and RStudio, and run your very first lines of code.

📂

Data Handling

Import spreadsheets, tidy messy data, and select the rows and columns you need.

📈

Visualization

Create plots with ggplot2.

📊

Descriptive Statistics

Summarise your data: means, medians, standard deviations, and more.

🔬

Hypothesis Testing

t-tests, chi-square, and Mann–Whitney tests for clinical data.

📐

Regression

Understand dose–response relationships with linear and logistic regression.


How to read a function page

Each page follows the same structure:

Section What you’ll find
Syntax All call variants with argument names
Description What each call variant does, in plain English
Examples Runnable examples — edit and re-run in your browser
Input Arguments Every argument explained with type and default value

Center for Pharmaceutical Data Science Education

Built with Quarto and webR

© CPDSE 2026