third.eye: Visualize flexplot with the "third eye"

View source: R/third.eye.R

third.eyeR Documentation

Visualize flexplot with the "third eye"

Description

Sometimes with multivariate data, it is important to be able to view the graphics from different perspectives (e.g., swapping the axis with a paneled variable). One could simply modify the formula in "flexplot()", but that's tedious. It is much better to hire a psychic to do the modifications for you. That's where "third.eye()" comes in. With this simple function, the user only needs to specify a formula, and it will permute the different combinations ofr formulae to generate different views. So, put on your psychic lenses and prepare for a wild ride.

Usage

third.eye(
  formula,
  data,
  fixed.positions = NULL,
  which.perms = NULL,
  plot = NULL,
  ...
)

Arguments

formula

A "flexplot()"-style formula (e.g., "y~x1 + x2 | x3 + x4")

data

A dataset.

fixed.positions

a vector of booleons that is as long as the number of variables specified. This will specify which variables ought to remain fixed in place. For example, if the formula is "y~x1 + x2 | x3 + x4" and third.eye is "c(F,F,T,T)", the function will only vary the positions of x3 and x4.

which.perms

a vector of numbers. Normally "third.eye()" will randomly select from the possible permutations of the equation to generate new views. The user can specify a vector of numbers to specify which of the permutations to display. How do you know which permutations you want, you ask? Hell if I know. Just put some numbers in and choose what suits your fancy.

plot

A "flexplot()" image. Sometimes it's just nice to have a graphic you KNOW you want to display and just look at other views, eh? That's what this is for. But it's not necessary. I don't care much. We're good.

...

Other parameters passed to flexplot.

Value

a Graphic

See Also

flexplot

Examples

data(exercise_data)
third.eye(weight.loss~gender + motivation | therapy.type + health, data=exercise_data)

dustinfife/flexplot documentation built on Sept. 23, 2024, 9:01 p.m.