risk: Risk data set

riskR Documentation

Risk data set

Description

The risk dataset contains 246 records and 6 variables. The target variable is risk, a factor with two levels ("good risk" and "bad risk"). The remaining five variables serve as predictors. The dataset was simulated to reflect a realistic real-world scenario.

Usage

 data(risk) 

Format

the risk dataset, as a data frame, contains 246 rows (customers) and 6 columns (variables/features). the 6 variables are:

  • age: age in years.

  • marital: A factor with levels "single", "married", and "other".

  • income: yearly income.

  • mortgage: A factor with levels "yes" and "no".

  • nr_loans: Number of loans that constomers have.

  • risk: A factor with levels "good risk" and "bad risk".

References

Larose, D. T. and Larose, C. D. (2014). Discovering knowledge in data: an introduction to data mining. John Wiley & Sons.

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, cereal, advertising, marketing, drug, house, house_price, red_wines, white_wines, insurance, caravan, fertilizer, corona

Examples

data(risk)
str(risk)

liver documentation built on Feb. 19, 2026, 1:07 a.m.