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,414

Version

1.23

License

GPL (>= 2)

Maintainer

Abdolreza Mohammadi

Last Published

October 5th, 2025

Functions in liver (1.23)

kNN.plot

Visualizing the Optimal Number of k
partition

Partition the data
prop.conf

Confdidence interval for proportion
skim

Skim a data frame to get useful summary statistics
scaler

Feature scaling
marketing

marketing data set
t_conf

Confdidence interval for mean
risk

Risk data set
skewness

Skewness
zscore

Z-score scaling of numerical variables
redWines

Red wines data set
one.hot

One Hot Encoder
minmax

Min-Max scaling of numerical variables
mae

Mean Absolute Error (MAE)
house

house data set
liver-package

liver: Foundations Toolkit and Datasets for Data Science
whiteWines

White wines data set
z.conf

Confdidence interval for mean using z-distribution
bank

Bank marketing data set
caravan

Caravan insurance data set
corona

Corona data set
advertising

advertising data set
conf.mat

Confusion Matrix
accuracy

Average classification accuracy
adult

adult data set
churn

Churn data set
drug

drug data set
cereal

Cereal data set
housePrice

housePrice dataset
churnTel

churnTel dataset
fertilizer

Fertilizer data set
churnCredit

Churn dataset for Credit Card Customers
kNN

k-Nearest Neighbour Classification
find.na

find.na
insurance

insurance data set
conf.mat.plot

Plot Confusion Matrix
mse

Mean Squared Error (MSE)