~ubuntu-branches/ubuntu/oneiric/latticeextra/oneiric

« back to all changes in this revision

Viewing changes to R/combineLimits.R

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2011-06-08 06:15:50 UTC
  • mfrom: (1.4.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110608061550-94qtrlng293oi282
Tags: 0.6-18-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        limits <- array(limits, dim = dim(x))
36
36
        for (i in seq_len(prod(dim(x))))
37
37
        {
38
 
            index.combine <- index.entry <- Rows(indices, i)
 
38
            ## index.combine <- index.entry <- Rows(indices, i)
 
39
            index.combine <- Rows(indices, i)
39
40
            index.combine[margin] <- list(TRUE)
40
 
            limits[[i]] <-
41
 
                range(do.call("[", c(list(limits), index.combine)), finite = TRUE)
 
41
            ## limits[[i]] <-
 
42
            ##     range(do.call("[", c(list(limits), index.combine)), finite = TRUE)
 
43
            
 
44
            li <- unlist(do.call("[", c(list(limits), index.combine)))
 
45
            limits[[i]] <- if(all(is.na(li))) li else range(li, finite = TRUE)
42
46
        }
43
47
        if (extend) lapply(limits, lattice:::extend.limits)
44
48
        else limits