mirror of
https://github.com/andre-wojtowicz/uci-ml-to-r.git
synced 2024-07-22 07:35:30 +02:00
14 lines
419 B
R
14 lines
419 B
R
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)
|
|
} |