---
title: "Beo phi 2025-10-21"
author: "MHuong"
date: "2025-10-21"
output: html_document
---
ob = read.csv("D:\\2025-10-Tap huan_Phan tich du lieu va cong bo Quoc te danh cho giang vien\\Obesity data.csv")
```Kích thước dữ liệu
dim(ob)
nrow(ob)
ncol(ob)
head(ob)
tail(ob)
summary(ob)
ob\(sex <- ifelse(ob\)gender == “F”, 1, 0)
ob\(obese <- cut(ob\)bmi, breaks = c(-Inf, 18.5, 25.0, 30.0, Inf), labels = c(“Underweight”, “Normal”, “Overweight”, “Obese”), right = FALSE)
names(ob) dim(ob)
head(ob\(weight) head(ob\)FatPercent)
ob\(fat.kg <- ob\)weight * ob\(pcfat / 100 ob\)lean.kg <- ob\(weight - ob\)fat.kg
men.overweight <- subset(ob, gender == “M” & bmi >= 25.0) dim(men.overweight)
Demo <- ob[, c(“id”, “age”, “gender”, “height”, “weight”, “pcfat”)]