Learn R Programming

ForCausality

The ForCausality package provides a curated and comprehensive collection of datasets designed for causal inference research. It brings together data from diverse domains such as clinical trials, cancer studies, epidemiological surveys, environmental exposures, and health-related observational studies.

Installation

You can install the ForCausality package from CRAN with the following R function:

install.packages("ForCausality")

Dataset Suffixes

Each dataset in ForCausality is labeled with a sufix to indicate its structure and type:

  • _df: A standar dataframe.

  • _tbl_df: A tibble data frame object.

  • _list: A list object.

Datasets included in ForCausality

  • Colon_df: Chemotherapy for Stage B/C colon cancer

  • Stroke_df: Fictional ischemic stroke data case control data with risk factors, exposures and confounders

  • Pph_df: An external control trial of treatments for post-partum hemorrhage

Example Code:

# Load the package
library(ForCausality)

# Load a dataset from the package
data(Colon_df)

# Show the first six rows of the dataset
head(Colon_df)

# Display the structure of the dataset
str(Colon_df)

# Summarize key variables
summary(Colon_df)

# Visualize treatment groups and survival status
table(Colon_df$treatment, Colon_df$survival)

# Open the dataset in the RStudio viewer
View(Colon_df)

Copy Link

Version

Install

install.packages('ForCausality')

Monthly Downloads

134

Version

0.1.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Tomás Valderrama

Last Published

October 25th, 2025

Functions in ForCausality (0.1.0)

Stroke_df

Ischemic Stroke Case-Control Data
Udca_df

Ursodeoxycholic Acid Trial Data
Thiam_df

Thiamethoxam Application and Crop Yield Data
Cloth_df

Clothianidin Concentration in Maize Plants
Gbsg_df

Breast Cancer Prognostic Data (German Breast Cancer Study Group)
Pain_df

Chronic Pain Clinical Trial Data
Benzene_df

Benzene Exposure and Chromosome Damage Data
Mouse_df

Mouse Cancer Trial Data
Lead_df

Lead Exposure Data
Sebor_df

Seborrheic Dermatitis Clinical Trial Data
Skin_df

Skin Condition Clinical Trial Data
Pph_df

External Control Trial Data for Post-partum Hemorrhage
SmokeH_df

Smoking and Homocysteine Data
Periodontal_df

Periodontal Disease Data
Resp_df

Respiratory Disorder Clinical Trial Data
Rotterdam_df

Breast Cancer Prognostic Data (Rotterdam Study)
Colon_df

Chemotherapy Data for Stage B/C Colon Cancer
ForCausality

ForCausality: A Curated Collection of Causal Inference Datasets and Tools