~ubuntu-branches/ubuntu/vivid/ess/vivid

« back to all changes in this revision

Viewing changes to etc/slow-long-output.R

  • Committer: Package Import Robot
  • Author(s): Dirk Eddelbuettel
  • Date: 2014-09-13 09:03:04 UTC
  • mfrom: (1.2.33)
  • Revision ID: package-import@ubuntu.com-20140913090304-ckjf1ajwpap2h1ny
Tags: 14.09-1
New upstream version released today 

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
##' construct (random) character vector of length n,  of about 10 characters each
5
5
mkCh <- function(n) {
6
6
    if(getOption("max.print") <= n) options(max.print = n + 1) ## <-
 
7
    if(n == 10) stop("error's message with apostrophe - work's in developer mode")
7
8
    N <- pmin(26,pmax(1, rpois(n, 10)))
8
9
    cbind(vapply(N, function(m) paste(sample(letters, m), collapse=""), ""))
9
10
}