# t.trellis

##### Interchange the x- and y-axes for an S-Plus trellis object. Identity function for an R lattice object.

In S-Plus, change the `"trellis"`

object to effectively, and
after-the-fact convert formulas from `(y ~ x | g)`

to ```
(x ~
y | g)
```

. This is needed in S-Plus because most S-Plus trellis
functions do not permit factors on the right-hand side of the formula.
In R lattice functions, factors are permitted on the right-hand side
of the formula. Therefore we make `t.trellis`

an identity
operator in R.

- Keywords
- dplot

##### Usage

`t.trellis(x)`

##### Arguments

- x
- any
`"trellis"`

object.

##### Details

In S-Plus, a warning is generated if the panel component of the
`"trellis"`

object is a function. No warning is generated when
the panel component of the `"trellis"`

object is a character
string naming the function. We interchange the `x`

and `y`

values of the ```
c("x", "y", "xlab", "ylab", "xlim", "ylim",
"adj.xlim", "adj.ylim")
```

components of the `"trellis"`

object,
and are aware of special features of the panel functions listed in the
S-Plus version of `t.trellis`

. The transpose will usually work
correctly for other panel functions.

##### Value

- In S-Plus, a
`"trellis"`

object with all x and y components interchanged. In R, the argument`"trellis"`

object is returned unchanged.

##### References

Heiberger, Richard~M. and Holland, Burt (2004b).
*Statistical Analysis and Data Display: An Intermediate Course
with Examples in S-Plus, R, and SAS*.
Springer Texts in Statistics. Springer.
ISBN 0-387-40270-5.

##### See Also

##### Examples

```
tmp <- data.frame(y=rnorm(30), x=factor(rep(1:3,10)))
if.R(r=
bwplot(y ~ x, data=tmp)
,s=
t(bwplot(x ~ y, data=tmp))
)
```

*Documentation reproduced from package HH, version 1.18-1, License: GPL version 2 or newer*