Learn R Programming

liver (version 1.27)

drug: drug data set

Description

synthetically generated dataset of \(200\) patients includes their age, sodium-to-potassium (Na/K) ratio, and the prescribed drug type.

Usage

data(drug)

Arguments

Format

the drug dataset, as a data frame, contains \(200\) rows (customers) and \(3\) columns (variables/features). the \(3\) variables are:

  • age: age of patients.

  • ratio: sodium-to-potassium (Na/K) ratio.

  • type: the prescribed drug type in three levels (A, B, and C).

References

Reza Mohammadi (2025). Data Science Foundations and Machine Learning with R: From Data to Decisions. https://book-data-science-r.netlify.app.

See Also

bank, churn_mlc, churn, churn_tel, adult, risk, cereal, advertising, marketing, house, house_price, red_wines, white_wines, insurance, caravan, fertilizer, corona

Examples

Run this code
data(drug)
str(drug)

Run the code above in your browser using DataLab