inst/util/ggobi-to-rdata.r

library(plyr)

paths <- dir("~/ggobi/ggobi/data", pattern = "\\.csv$", full = TRUE)
names(paths) <- gsub("\\.csv", "", basename(paths))
all <- llply(paths, read.csv, row.names = 1) 

l_ply(names(all), function(name) {
  data <- all[[name]]
  names(data) <- tolower(names(data)) 
  assign(name, data)
  save(list = name, file = paste("data/", name, ".rda", sep = ""))
})

Try the tourr package in your browser

Any scripts or data that you put into this service are public.

tourr documentation built on May 29, 2024, 11:22 a.m.