Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

if.R

Conditional Execution for R or S-Plus


Description

if.R uses the is.R function to determine whether to execute the expression in the r argument or the expression in the s argument.

Usage

if.R(r, s)

Arguments

r

Any R expression, including a group of expressions nested in braces. Assignments made in this expression are available to the enclosing function.

s

Any S-Plus expression, including a group of expressions nested in braces. Assignments made in this expression are available to the enclosing function.

Details

Not all functions are in both implementations of the S language. In particular, panel functions for lattice in R (based on grid graphics) are very different from panel functions for trellis (based on the older graphics technology) in S-Plus.

Value

The result of the executed expression.

Author(s)

Richard M. Heiberger <rmh@temple.edu>

See Also

Examples

if.R(r={"This is R."},
      s={"This is S-Plus"})

HH

Statistical Analysis and Data Display: Heiberger and Holland

v3.1-43
GPL (>= 2)
Authors
Richard M. Heiberger
Initial release
2020-11-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.