# NOT RUN {
  tcltk::tclRequire("Tktable", warn = TRUE)
  n <- 1000L
  V1 <- sample(c(1:9, NA), n, replace = TRUE)
  V2 <- sample(LETTERS, n, replace = TRUE)
  V3 <- as.POSIXct(rnorm(n, mean = 0, sd = 1e6), origin = "2010-01-01")
  V4 <- sample(V1 * pi, n)
  d <- data.frame(V1, V2, V3, V4)
  col.names <- c("Integers", "Letters", "DateTime", "Numeric")
  col.formats <- c("%d", "%s", "%m/%d/%Y %H:%M", "")
  obj <- EditData(d, col.names, col.formats)
  str(obj)
  rownames(d) <- paste0(sample(LETTERS, n, replace = TRUE), seq_len(n))
  EditData(d, read.only = TRUE)
  colnames(d) <- NULL
  rownames(d) <- NULL
  EditData(d, read.only = TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab