mirror of
https://github.com/andre-wojtowicz/uci-ml-to-r.git
synced 2024-11-22 15:55:29 +01:00
14 lines
430 B
R
14 lines
430 B
R
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)
|
|
} |