1
0
mirror of https://github.com/andre-wojtowicz/uci-ml-to-r.git synced 2024-07-23 07:40:30 +02:00
uci-ml-to-r/data-collection/indian-liver/preprocess.R

14 lines
419 B
R
Raw Normal View History

preprocess.dataset = function()
{
csv.file = "Indian Liver Patient Dataset (ILPD).csv"
dataset = read.csv(file.path(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)
}