Skip to content
Snippets Groups Projects
Select Git revision
  • issue#16
  • issue#15
  • vignette-01
  • devel
  • dataset/1 default protected
5 results

twoStripCombined.Rd

Blame
  • twoStripCombined.Rd 1.71 KiB
    % Generated by roxygen2 (4.1.1): do not edit by hand
    % Please edit documentation in R/twoStripCombined.R
    \name{twoStripCombined}
    \alias{twoStripCombined}
    \title{Combine two (lattice) strips in one to save space}
    \usage{
    twoStripCombined(textPos = c("border", "center"), sep = ": ",
      invert = TRUE, which.given, which.panel, factor.levels, var.name,
      strip.names = var.name, bg, ...)
    }
    \arguments{
    \item{textPos}{position of the strip annotation. The \code{"border"}
    value indicates that the first conditioning variable is to be aligned
    to left strip border and the second to the right strip border. The
    \code{"center"} indicates tha the first is to be right aligned to the
    strip center and the second to be left aligned to strip center.}
    
    \item{sep}{a strip, to separate variable names and levels when
    concatenation is required.}
    
    \item{invert}{logical, \code{TRUE} means that the first is to be
    placed on left strip side.}
    
    \item{which.given,which.panel,factor.levels,var.name,strip.names,bg,...}{arguments of \link[lattice]{strip.default}.}
    }
    \description{
    This function allows combining two strips in one to save
    space in lattice graphics. It was designed to be used with two
    conditioning variables.
    }
    \examples{
    library(lattice)
    
    xyplot(yield~K|N+P, data=npk, type=c("p","a"))
    
    xyplot(yield~K|N+P, data=npk, type=c("p","a"),
           strip=twoStripCombined,
           par.strip.text=list(lines=0.6))
    
    xyplot(yield~K|N+P, data=npk, type=c("p","a"),
           strip=function(...){
               twoStripCombined(textPos="center", sep="=",
                                strip.names=c("Nitr", "Phos"),
                                invert=TRUE, ...)
           },
           par.strip.text=list(lines=0.5),
           par.settings=list(strip.background=list(col="gray75")))
    }