Learn R Programming

liver

The R package liver provides a suite of helper functions and a collection of datasets used in the book Data Science Foundations and Machine Learning with R: From Data to Decisions. Designed to make data science techniques accessible to individuals with minimal coding experience, it simplifies tasks such as data partitioning for out-of-sample testing and data transformations (z-score and min-max). Inspired by an ancient Persian idiom, the package likens this learning process to "eating the liver of data science," symbolizing deep and immersive engagement with the field. In addition to its helper functions, liver also includes a collection of datasets valuable for multivariate analysis.

Installation

To install the latest version of this package from CRAN, do the following from the R console:

install.packages("liver")

Loading

library(liver)

Example for Data Analysis

To see how to use the functionality of the package for data analysis:

Copy Link

Version

Install

install.packages('liver')

Monthly Downloads

1,064

Version

1.26

License

GPL (>= 2)

Maintainer

Abdolreza Mohammadi

Last Published

November 26th, 2025

Functions in liver (1.26)

zscore

Z-score scaling of numerical variables
skewness

Skewness
z.conf

Confdidence interval for mean using z-distribution
t_conf

Confdidence interval for mean
whiteWines

White wines data set
scaler

Feature scaling
skim

Skim a data frame to get useful summary statistics
churnTel

churnTel dataset
conf.mat.plot

Plot Confusion Matrix
gapminder

Gapminder Data on Global Health, Income, and Population
churnCredit

Churn dataset for Credit Card Customers
find.na

find.na
conf.mat

Confusion Matrix
fertilizer

Fertilizer data set
corona

Corona data set
kNN

k-Nearest Neighbour Classification
minmax

Min-Max scaling of numerical variables
housePrice

housePrice dataset
accuracy

Average classification accuracy
caravan

Caravan insurance data set
one.hot

One Hot Encoder
kNN.plot

Visualizing the Optimal Number of k
bank

Bank marketing data set
prop.conf

Confdidence interval for proportion
liver-package

liver: Foundations Toolkit and Datasets for Data Science
mse

Mean Squared Error (MSE)
risk

Risk data set
insurance

insurance data set
marketing

marketing data set
redWines

Red wines data set
house

house data set
partition

Partition the data
adult

adult data set
churn

Churn data set
drug

drug data set
cereal

Cereal data set
mae

Mean Absolute Error (MAE)
advertising

advertising data set