Defines functions narrDF narrDFcols mapmeta

Documented in mapmeta

mapmeta = function() {
  tab = read.csv(
   dir(system.file("metadata_csv",package="erma"), full.names=TRUE), 
 sexcol = grep("SEX", colnames(tab))
 colnames(tab)[sexcol] = "SEX"

narrDFcols = function() {
   basic = c(2,4,6,17,18,21)
   cand = options()$narrDFcols
   if (is.null(cand)) return(basic)
setClass("narrDF", contains="DataFrame")
setMethod("show", "narrDF", function(object) {
cat("(showing narrow slice of ", nrow(object), "x", ncol(object), " DataFrame)\   ")
if (ncol(object)==95) callNextMethod(object[,narrDFcols()])
else callNextMethod(object)
cat("use colnames() for full set of metadata attributes.\n")

narrDF = function(x) new("narrDF", x)

Try the erma package in your browser

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

erma documentation built on May 2, 2018, 2:39 a.m.