{ # check that the .Data's under the library sections have something # in them. if(platform() == "DOS386" || platform() == "WIN386") { libnames <- c("Defunct", "examples", "progdraw", "progexam", "semantics") data <- "_Data" } else { libnames <- c("Defunct", "demo", "examples", "external", "image", "maps", "mathematica", "progdraw", "progexam", "semantics") data <- ".Data" } lib.pos <- length(search()) + 1 sizes <- integer(length(libnames)) for(lib in seq(along=libnames)) { dir <- paste(getenv("SHOME"), "/library/", libnames[lib], "/", data, sep = "") attach(dir, pos = lib.pos) sizes[lib] <- length(objects(lib.pos)) detach(lib.pos) } if (all(sizes>5)) T else { cat ("Checking library .Data directories for these libraries:\n") print (libnames) cat ("\nExpected all of these sizes to be >5.\n") print (sizes) F } }