1
0
mirror of https://github.com/andre-wojtowicz/uci-ml-to-r.git synced 2024-11-26 16:15:29 +01:00
uci-ml-to-r/data-collection/indian-liver/preprocess.R

14 lines
430 B
R
Raw Normal View History

preprocessDataset = function()
{
csv.file = "Indian Liver Patient Dataset (ILPD).csv"
dataset = read.csv(paste0(orig.dir, "/", csv.file),
header=FALSE)
colnames(dataset) = c("Age", "Gender", "TB", "DB", "Alkphos", "Sgpt",
"Sgot", "TP", "ALB", "A/G Ratio", "Selector")
dataset = dataset %>% mutate(Selector=factor(Selector))
return(dataset)
}