We need an R function which reads a csv file and converts it to an arff file. The R foreign library has an usable write.arff: https://stat.ethz.ch/R-manual/R-devel/library/foreign/html/write.arff.html
When reading a csv file, String arguments will be read as factors (with all values as allowed levels), to prevent this, use the stringsAsFactors = F option of read.csv.
csvToArff <- function(in_path, out_path) {
# code here
}
We need an R function which reads a csv file and converts it to an arff file. The R foreign library has an usable write.arff: https://stat.ethz.ch/R-manual/R-devel/library/foreign/html/write.arff.html When reading a csv file, String arguments will be read as factors (with all values as allowed levels), to prevent this, use the stringsAsFactors = F option of read.csv.
Input
Output