Skip to content

Instantly share code, notes, and snippets.

@fdavidcl
Last active October 31, 2017 13:25
Show Gist options
  • Save fdavidcl/e72e24ad6edff6d2d22db8db16b84182 to your computer and use it in GitHub Desktop.
Save fdavidcl/e72e24ad6edff6d2d22db8db16b84182 to your computer and use it in GitHub Desktop.
#!/usr/bin/env Rscript
library(mldr.datasets)
name <- commandArgs(trailingOnly = T)
mld <- readRDS(paste0(name, "-rand-1x10-1-tst.rds"))
new_header <- mldr.datasets:::export.meka.header(mld)
system(paste0('sed -i "" "1s/.*/', new_header, '/" ', name, '-*.arff'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment