This is RInterface.info, produced by Macaulay2, version 1.26.06

RInterface -- interface to R for statistical computing
******************************************************

Description
===========

This package allows for the ability to interface with R (see
https://www.r-project.org/ ) for statistical computing inside Macaulay2.

+-----------------------------------------------------------------------------+
|i1 : dataFrame = RFunction "data.frame"                                      |
|                                                                             |
|o1 = dataFrame                                                               |
|                                                                             |
|o1 : RFunction                                                               |
+-----------------------------------------------------------------------------+
|i2 : chisqTest = RFunction "chisq.test"                                      |
|                                                                             |
|o2 = chisqTest                                                               |
|                                                                             |
|o2 : RFunction                                                               |
+-----------------------------------------------------------------------------+
|i3 : M = dataFrame(F => {762, 327, 468}, M => {484, 239, 477},               |
|         "row.names" => {"Democrat", "Independent", "Republican"})           |
|                                                                             |
|o3 =               F   M                                                     |
|     Democrat    762 484                                                     |
|     Independent 327 239                                                     |
|     Republican  468 477                                                     |
|                                                                             |
|o3 : RObject of type list                                                    |
+-----------------------------------------------------------------------------+
|i4 : chisqTest M                                                             |
|                                                                             |
|o4 =                                                                         |
|             Pearson's Chi-squared test                                      |
|                                                                             |
|     data:  structure(list(F = c(762L, 327L, 468L), M = c(484L, 239L, 477L)),|
|     X-squared = 30.07, df = 2, p-value = 2.954e-07                          |
|                                                                             |
|                                                                             |
|o4 : RObject of type list                                                    |
|-----------------------------------------------------------------------------|
|class = "data.frame", row.names = c("Democrat", "Independent", "Republican"))|
+-----------------------------------------------------------------------------+
|i5 : value oo_"p.value"                                                      |
|                                                                             |
|o5 = 2.953589183211757e-7                                                    |
|                                                                             |
|o5 : RR (of precision 53)                                                    |
+-----------------------------------------------------------------------------+

classes

functions

Author
======

  * Doug Torrance (see https://d-torrance.github.io ) <dtorrance9@gatech.edu>

Version
=======

This documentation describes version 0.3 of RInterface, released June 5, 2026.

Citation
========

If you have used this package in your research, please cite it as follows:

+-----------------------------------------------------------------------------+
|@misc{RInterfaceSource,                                                      |
|  title = {{RInterface: interface to R for statistical computing. Version~0.3|
|  author = {Doug Torrance},                                                  |
|  howpublished = {A \emph{Macaulay2} package available at                    |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages}} |
|}                                                                            |
|-----------------------------------------------------------------------------|
|}},                                                                          |
+-----------------------------------------------------------------------------+

Exports
=======

  * Types
      * RContext -- R context
      * RFunction -- R function
      * RObject -- R object
  * Functions and commands
      * library -- load an R package
      * RQuote -- create an unevaluated R symbol
      * RSymbol -- look up an R object by name
      * RValue -- evaluate R code
  * Methods
      * ~ RObject -- bitwise NOT of an R object, or create a
        one-sided formula
      * abs(RObject) -- absolute value of an R object
      * acos(RObject) -- arccosine of an R object
      * acosh(RObject) -- hyperbolic arccosine of an
        R object
      * asin(RObject) -- arcsine of an R object
      * asinh(RObject) -- hyperbolic arcsine of an R
        object
      * atan(RObject) -- arctangent of an R object
      * atan2(RObject,RObject), --
        two-argument arctangent of R objects
      * "atan2(RObject,Thing)" -- see atan2(RObject,RObject),
        -- two-argument arctangent of R objects
      * "atan2(Thing,RObject)" -- see atan2(RObject,RObject),
        -- two-argument arctangent of R objects
      * atanh(RObject) -- hyperbolic arctangent of
        an R object
      * Beta(RObject,RObject) -- beta
        function of R objects
      * "Beta(RObject,Thing)" -- see Beta(RObject,RObject),
        -- beta function of R objects
      * "Beta(Thing,RObject)" -- see Beta(RObject,RObject),
        -- beta function of R objects
      * binomial(RObject,RObject), --
        binomial coefficient of R objects
      * "binomial(RObject,Thing)" -- see binomial(RObject,RObject),
        -- binomial coefficient of R objects
      * "binomial(Thing,RObject)" -- see binomial(RObject,RObject),
        -- binomial coefficient of R objects
      * ceiling(RObject) -- ceiling of an R object
      * conjugate(RObject) -- complex conjugate
        of an R object
      * cos(RObject) -- cosine of an R object
      * cosh(RObject) -- hyperbolic cosine of an R
        object
      * Digamma(RObject) -- digamma function of an
        R object
      * exp(RObject) -- exponential of an R object
      * expm1(RObject) -- exponential minus 1 of an
        R object
      * floor(RObject) -- floor of an R object
      * Gamma(RObject) -- gamma function of an R
        object
      * imaginaryPart(RObject) -- imaginary
        part of an R object
      * iterator(RObject) -- iterate through an R
        object
      * length(RObject) -- the length of an R
        object
      * "listSymbols(RContext)" -- see listSymbols(RObject),
        -- list symbols in an R environment
      * listSymbols(RObject) -- list symbols
        in an R environment
      * lngamma(RObject) -- log-gamma function of
        an R object
      * log(RObject) -- natural logarithm of an R
        object
      * log1p(RObject) -- natural logarithm of 1
        plus an R object
      * max(RObject) -- maximum of an R object
      * min(RObject) -- minimum of an R object
      * new RContext from String -- construct
        an R context
      * new RObject from Boolean -- create an
        R logical vector from a Boolean
      * new RObject from CC -- create an R complex
        vector from a complex number
      * new RObject from HashTable -- create
        an R environment from a hash table
      * new RObject from List -- create an R
        vector from a list
      * new RObject from Matrix -- create an R
        matrix from a Macaulay2 matrix
      * "?? RObject" -- see new RObject from Nothing,
        -- create an R NULL object
      * new RObject from Nothing -- create an
        R NULL object
      * "new RObject from Number" -- see new RObject from RR,
        -- create an R double vector from a real or rational number
      * new RObject from RR -- create an R double
        vector from a real or rational number
      * new RObject from Sequence -- create
        an R pairlist from a sequence
      * new RObject from String -- create an R
        character vector from a string
      * new RObject from Symbol -- create an R
        character vector from a symbol
      * new RObject from ZZ -- create an R integer
        vector from an integer
      * not RObject -- logical negation of an R object
      * product(RObject) -- product of elements of
        an R object
      * "new RContext" -- see RContext, -- R context
      * RContext _ String -- get a variable from an
        R context
      * RContext String -- evaluate R code in a context
      * realPart(RObject) -- real part of an R
        object
      * "new RFunction from RObject" -- see RFunction, -- R
        function
      * "new RFunction from String" -- see RFunction, -- R
        function
      * "new RFunction from Thing" -- see RFunction, -- R
        function
      * "net(RObject)" -- see RObject, -- R object
      * "toString(RObject)" -- see RObject, -- R object
      * RObject ! -- factorial of an R object
      * RObject % RObject -- modulo of R objects
      * "RObject % Thing" -- see RObject % RObject, --
        modulo of R objects
      * "Thing % RObject" -- see RObject % RObject, --
        modulo of R objects
      * RObject & RObject -- bitwise AND of R objects
      * "RObject & Thing" -- see RObject & RObject, --
        bitwise AND of R objects
      * "Thing & RObject" -- see RObject & RObject, --
        bitwise AND of R objects
      * RObject * RObject -- multiply R objects
      * "RObject * Thing" -- see RObject * RObject,
        -- multiply R objects
      * "Thing * RObject" -- see RObject * RObject,
        -- multiply R objects
      * "+ RObject" -- see RObject + RObject, -- add R
        objects
      * RObject + RObject -- add R objects
      * "RObject + Thing" -- see RObject + RObject, --
        add R objects
      * "Thing + RObject" -- see RObject + RObject, --
        add R objects
      * "- RObject" -- see RObject - RObject, --
        subtract R objects
      * RObject - RObject -- subtract R objects
      * "RObject - Thing" -- see RObject - RObject, --
        subtract R objects
      * "Thing - RObject" -- see RObject - RObject, --
        subtract R objects
      * RObject / RObject -- divide R objects
      * "RObject / Thing" -- see RObject / RObject, --
        divide R objects
      * "Thing / RObject" -- see RObject / RObject, --
        divide R objects
      * RObject // RObject -- floor division of R
        objects
      * "RObject // Thing" -- see RObject // RObject,
        -- floor division of R objects
      * "Thing // RObject" -- see RObject // RObject,
        -- floor division of R objects
      * "RObject .. RObject" -- see RObject _colon_ RObject,
        -- R colon operator
      * "RObject .. Thing" -- see RObject _colon_ RObject,
        -- R colon operator
      * RObject _colon_ RObject -- R colon operator
      * "RObject : Thing" -- see RObject _colon_ RObject,
        -- R colon operator
      * "Thing .. RObject" -- see RObject _colon_ RObject,
        -- R colon operator
      * "Thing : RObject" -- see RObject _colon_ RObject,
        -- R colon operator
      * RObject << RObject -- bitwise left shift of
        an R object
      * "RObject << Thing" -- see RObject << RObject,
        -- bitwise left shift of an R object
      * "Thing << RObject" -- see RObject << RObject,
        -- bitwise left shift of an R object
      * RObject == RObject -- equality of R objects
      * "RObject == Thing" -- see RObject == RObject,
        -- equality of R objects
      * "Thing == RObject" -- see RObject == RObject,
        -- equality of R objects
      * RObject >> RObject -- bitwise right shift of
        an R object
      * "RObject >> Thing" -- see RObject >> RObject,
        -- bitwise right shift of an R object
      * "Thing >> RObject" -- see RObject >> RObject,
        -- bitwise right shift of an R object
      * RObject ? RObject -- comparison of R objects
      * "RObject ? Thing" -- see RObject ? RObject, --
        comparison of R objects
      * "Thing ? RObject" -- see RObject ? RObject, --
        comparison of R objects
      * RObject ^ RObject -- exponentiation of R
        objects
      * "RObject ^ Thing" -- see RObject ^ RObject, --
        exponentiation of R objects
      * "Thing ^ RObject" -- see RObject ^ RObject, --
        exponentiation of R objects
      * RObject ^^ RObject -- bitwise XOR of R
        objects
      * "RObject ^^ Thing" -- see RObject ^^ RObject,
        -- bitwise XOR of R objects
      * "Thing ^^ RObject" -- see RObject ^^ RObject,
        -- bitwise XOR of R objects
      * RObject _ Thing -- extract a single element
        of an R object
      * RObject _ Thing = Thing -- replace a
        single element of an R object
      * RObject | RObject -- bitwise OR of R objects
      * "RObject | Thing" -- see RObject | RObject, --
        bitwise OR of R objects
      * "Thing | RObject" -- see RObject | RObject, --
        bitwise OR of R objects
      * RObject ~ RObject -- create a two-sided R
        formula
      * "RObject ~ Thing" -- see RObject ~ RObject, --
        create a two-sided R formula
      * "Thing ~ RObject" -- see RObject ~ RObject, --
        create a two-sided R formula
      * RObject and RObject -- logical conjunction
        of R objects
      * "RObject and Thing" -- see RObject and RObject,
        -- logical conjunction of R objects
      * "Thing and RObject" -- see RObject and RObject,
        -- logical conjunction of R objects
      * RObject Array -- extract multiple elements of an
        R object
      * RObject or RObject -- logical disjunction of
        R objects
      * "RObject or Thing" -- see RObject or RObject,
        -- logical disjunction of R objects
      * "Thing or RObject" -- see RObject or RObject,
        -- logical disjunction of R objects
      * RObject SPACE Array = Thing, --
        replace multiple elements of an R object
      * RObject xor RObject -- logical exclusive
        disjunction of R objects
      * "RObject xor Thing" -- see RObject xor RObject,
        -- logical exclusive disjunction of R objects
      * "Thing xor RObject" -- see RObject xor RObject,
        -- logical exclusive disjunction of R objects
      * "round(RObject)" -- see round(RObject,RObject),
        -- rounding of an R object
      * round(RObject,RObject) -- rounding
        of an R object
      * "round(RObject,Thing)" -- see round(RObject,RObject),
        -- rounding of an R object
      * "round(Thing,RObject)" -- see round(RObject,RObject),
        -- rounding of an R object
      * "RQuote(String)" -- see RQuote, -- create an unevaluated
        R symbol
      * "RQuote(Thing)" -- see RQuote, -- create an unevaluated R
        symbol
      * "RSymbol(String)" -- see RSymbol, -- look up an R object
        by name
      * "RSymbol(Thing)" -- see RSymbol, -- look up an R object
        by name
      * "RValue(Sequence)" -- see RValue, -- evaluate R code
      * "RValue(String)" -- see RValue, -- evaluate R code
      * sin(RObject) -- sine of an R object
      * sinh(RObject) -- hyperbolic sine of an R
        object
      * sqrt(RObject) -- square root of an R object
      * sum(RObject) -- sum of elements of an R object
      * tan(RObject) -- tangent of an R object
      * tanh(RObject) -- hyperbolic tangent of an R
        object
      * truncate(RObject) -- truncation of an R
        object
      * use(RContext) -- import R context variables
        into Macaulay2
      * value(RObject) -- convert R object to
        Macaulay2
  * Symbols
      * "Environment" -- see RValue, -- evaluate R code
  * Other things
      * NA -- missing value

For the programmer
==================

The object RInterface, is a package (Macaulay2Doc),
defined in RInterface.m2, with auxiliary files in RInterface/.

-------------------------------------------------------------------------------

The source of this document is in RInterface/doc.m2:28:0.

RObject -- R object
*******************

  * Usage:
        RObject x
  * Inputs:
      * x, a thing (Macaulay2Doc), a Macaulay2 object;
  * Outputs:
      * a R object, the R equivalent of x;

Description
===========

An RObject is a SEXP (pointer) to an R object in memory.  Note that in R, most
objects are actually vectors, and scalars are just vectors of length 1.

RObject is a SelfInitializingType (Macaulay2Doc),
and so it acts as its own constructor method.  When passed a Macaulay2 object
as input, the corresponding R object is returned.  See the converting to R
objects section below for the supported input types.

Each RObject is displayed by calling R's capture.output function.

+----------------------------+
|i1 : RObject {2, 4, 6, 8}   |
|                            |
|o1 = [1] 2 4 6 8            |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : RObject pi             |
|                            |
|o2 = [1] 3.141593           |
|                            |
|o2 : RObject of type double |
+----------------------------+

It is converted to a string using R's toString function.

+----------------------------------+
|i3 : toString RObject {2, 4, 6, 8}|
|                                  |
|o3 = 2, 4, 6, 8                   |
+----------------------------------+

converting to R objects

converting from R objects

extracting or replacing parts

iteration

arithmetic operators

relational operators

logical operators

bitwise operators

rounding

maxima, minima, sums, and products

power, exponential, and logarithmic functions

trigonometric functions

hyperbolic functions

complex number functions

special mathematical functions

formulas

Methods that use a R object:
============================

  * ~ RObject -- bitwise NOT of an R object, or create a
    one-sided formula
  * abs(RObject) -- absolute value of an R object
  * acos(RObject) -- arccosine of an R object
  * acosh(RObject) -- hyperbolic arccosine of an R
    object
  * asin(RObject) -- arcsine of an R object
  * asinh(RObject) -- hyperbolic arcsine of an R
    object
  * atan(RObject) -- arctangent of an R object
  * atan2(RObject,RObject) -- two-argument
    arctangent of R objects
  * "atan2(RObject,Thing)" -- see atan2(RObject,RObject),
    -- two-argument arctangent of R objects
  * "atan2(Thing,RObject)" -- see atan2(RObject,RObject),
    -- two-argument arctangent of R objects
  * atanh(RObject) -- hyperbolic arctangent of an R
    object
  * Beta(RObject,RObject) -- beta function
    of R objects
  * "Beta(RObject,Thing)" -- see Beta(RObject,RObject),
    -- beta function of R objects
  * "Beta(Thing,RObject)" -- see Beta(RObject,RObject),
    -- beta function of R objects
  * binomial(RObject,RObject), --
    binomial coefficient of R objects
  * "binomial(RObject,Thing)" -- see binomial(RObject,RObject),
    -- binomial coefficient of R objects
  * "binomial(Thing,RObject)" -- see binomial(RObject,RObject),
    -- binomial coefficient of R objects
  * ceiling(RObject) -- ceiling of an R object
  * conjugate(RObject) -- complex conjugate of
    an R object
  * cos(RObject) -- cosine of an R object
  * cosh(RObject) -- hyperbolic cosine of an R object
  * Digamma(RObject) -- digamma function of an R
    object
  * exp(RObject) -- exponential of an R object
  * expm1(RObject) -- exponential minus 1 of an R
    object
  * floor(RObject) -- floor of an R object
  * Gamma(RObject) -- gamma function of an R object
  * imaginaryPart(RObject) -- imaginary part
    of an R object
  * iterator(RObject) -- iterate through an R
    object
  * length(RObject) -- the length of an R object
  * listSymbols(RObject) -- list symbols in an
    R environment
  * lngamma(RObject) -- log-gamma function of an R
    object
  * log(RObject) -- natural logarithm of an R object
  * log1p(RObject) -- natural logarithm of 1 plus an
    R object
  * max(RObject) -- maximum of an R object
  * min(RObject) -- minimum of an R object
  * new RObject from Boolean -- create an R
    logical vector from a Boolean
  * new RObject from CC -- create an R complex
    vector from a complex number
  * new RObject from HashTable -- create an
    R environment from a hash table
  * new RObject from List -- create an R vector
    from a list
  * new RObject from Matrix -- create an R
    matrix from a Macaulay2 matrix
  * "?? RObject" -- see new RObject from Nothing,
    -- create an R NULL object
  * new RObject from Nothing -- create an R
    NULL object
  * "new RObject from Number" -- see new RObject from RR,
    -- create an R double vector from a real or rational number
  * new RObject from RR -- create an R double
    vector from a real or rational number
  * new RObject from Sequence -- create an R
    pairlist from a sequence
  * new RObject from String -- create an R
    character vector from a string
  * new RObject from Symbol -- create an R
    character vector from a symbol
  * new RObject from ZZ -- create an R integer
    vector from an integer
  * not RObject -- logical negation of an R object
  * product(RObject) -- product of elements of an
    R object
  * realPart(RObject) -- real part of an R object
  * "new RFunction from RObject" -- see RFunction, -- R
    function
  * "net(RObject)"
  * "toString(RObject)"
  * RObject ! -- factorial of an R object
  * RObject % RObject -- modulo of R objects
  * "RObject % Thing" -- see RObject % RObject, --
    modulo of R objects
  * "Thing % RObject" -- see RObject % RObject, --
    modulo of R objects
  * RObject & RObject -- bitwise AND of R objects
  * "RObject & Thing" -- see RObject & RObject, --
    bitwise AND of R objects
  * "Thing & RObject" -- see RObject & RObject, --
    bitwise AND of R objects
  * RObject * RObject -- multiply R objects
  * "RObject * Thing" -- see RObject * RObject, --
    multiply R objects
  * "Thing * RObject" -- see RObject * RObject, --
    multiply R objects
  * "+ RObject" -- see RObject + RObject, -- add R
    objects
  * RObject + RObject -- add R objects
  * "RObject + Thing" -- see RObject + RObject, -- add
    R objects
  * "Thing + RObject" -- see RObject + RObject, -- add
    R objects
  * "- RObject" -- see RObject - RObject, -- subtract
    R objects
  * RObject - RObject -- subtract R objects
  * "RObject - Thing" -- see RObject - RObject, --
    subtract R objects
  * "Thing - RObject" -- see RObject - RObject, --
    subtract R objects
  * RObject / RObject -- divide R objects
  * "RObject / Thing" -- see RObject / RObject, --
    divide R objects
  * "Thing / RObject" -- see RObject / RObject, --
    divide R objects
  * RObject // RObject -- floor division of R
    objects
  * "RObject // Thing" -- see RObject // RObject, --
    floor division of R objects
  * "Thing // RObject" -- see RObject // RObject, --
    floor division of R objects
  * "RObject .. RObject" -- see RObject _colon_ RObject,
    -- R colon operator
  * "RObject .. Thing" -- see RObject _colon_ RObject,
    -- R colon operator
  * RObject _colon_ RObject -- R colon operator
  * "RObject : Thing" -- see RObject _colon_ RObject,
    -- R colon operator
  * "Thing .. RObject" -- see RObject _colon_ RObject,
    -- R colon operator
  * "Thing : RObject" -- see RObject _colon_ RObject,
    -- R colon operator
  * RObject << RObject -- bitwise left shift of an R
    object
  * "RObject << Thing" -- see RObject << RObject, --
    bitwise left shift of an R object
  * "Thing << RObject" -- see RObject << RObject, --
    bitwise left shift of an R object
  * RObject == RObject -- equality of R objects
  * "RObject == Thing" -- see RObject == RObject, --
    equality of R objects
  * "Thing == RObject" -- see RObject == RObject, --
    equality of R objects
  * RObject >> RObject -- bitwise right shift of an
    R object
  * "RObject >> Thing" -- see RObject >> RObject, --
    bitwise right shift of an R object
  * "Thing >> RObject" -- see RObject >> RObject, --
    bitwise right shift of an R object
  * RObject ? RObject -- comparison of R objects
  * "RObject ? Thing" -- see RObject ? RObject, --
    comparison of R objects
  * "Thing ? RObject" -- see RObject ? RObject, --
    comparison of R objects
  * RObject ^ RObject -- exponentiation of R objects
  * "RObject ^ Thing" -- see RObject ^ RObject, --
    exponentiation of R objects
  * "Thing ^ RObject" -- see RObject ^ RObject, --
    exponentiation of R objects
  * RObject ^^ RObject -- bitwise XOR of R objects
  * "RObject ^^ Thing" -- see RObject ^^ RObject, --
    bitwise XOR of R objects
  * "Thing ^^ RObject" -- see RObject ^^ RObject, --
    bitwise XOR of R objects
  * RObject _ Thing -- extract a single element of an
    R object
  * RObject _ Thing = Thing -- replace a
    single element of an R object
  * RObject | RObject -- bitwise OR of R objects
  * "RObject | Thing" -- see RObject | RObject, --
    bitwise OR of R objects
  * "Thing | RObject" -- see RObject | RObject, --
    bitwise OR of R objects
  * RObject ~ RObject -- create a two-sided R formula
  * "RObject ~ Thing" -- see RObject ~ RObject, --
    create a two-sided R formula
  * "Thing ~ RObject" -- see RObject ~ RObject, --
    create a two-sided R formula
  * RObject and RObject -- logical conjunction of R
    objects
  * "RObject and Thing" -- see RObject and RObject,
    -- logical conjunction of R objects
  * "Thing and RObject" -- see RObject and RObject,
    -- logical conjunction of R objects
  * RObject Array -- extract multiple elements of an R
    object
  * RObject or RObject -- logical disjunction of R
    objects
  * "RObject or Thing" -- see RObject or RObject, --
    logical disjunction of R objects
  * "Thing or RObject" -- see RObject or RObject, --
    logical disjunction of R objects
  * RObject SPACE Array = Thing -- replace
    multiple elements of an R object
  * RObject xor RObject -- logical exclusive
    disjunction of R objects
  * "RObject xor Thing" -- see RObject xor RObject,
    -- logical exclusive disjunction of R objects
  * "Thing xor RObject" -- see RObject xor RObject,
    -- logical exclusive disjunction of R objects
  * "round(RObject)" -- see round(RObject,RObject),
    -- rounding of an R object
  * round(RObject,RObject) -- rounding of
    an R object
  * "round(RObject,Thing)" -- see round(RObject,RObject),
    -- rounding of an R object
  * "round(Thing,RObject)" -- see round(RObject,RObject),
    -- rounding of an R object
  * sin(RObject) -- sine of an R object
  * sinh(RObject) -- hyperbolic sine of an R object
  * sqrt(RObject) -- square root of an R object
  * sum(RObject) -- sum of elements of an R object
  * tan(RObject) -- tangent of an R object
  * tanh(RObject) -- hyperbolic tangent of an R
    object
  * truncate(RObject) -- truncation of an R
    object
  * value(RObject) -- convert R object to Macaulay2

For the programmer
==================

The object RObject, is a self initializing type (Macaulay2Doc),
with ancestor classes voidstar (ForeignFunctions),
< ForeignObject (ForeignFunctions)
< HashTable (Macaulay2Doc) <
Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:127:0.

new RObject from Boolean -- create an R logical vector from a Boolean
*********************************************************************

  * Usage:
        RObject x
  * Inputs:
      * x, a Boolean value (Macaulay2Doc),
  * Outputs:
      * a R object, a logical vector of length 1;

Description
===========

Converts a Macaulay2 Boolean (Macaulay2Doc), to an R logical
vector of length 1.

+----------------------------+
|i1 : RObject true           |
|                            |
|o1 = [1] TRUE               |
|                            |
|o1 : RObject of type logical|
+----------------------------+
|i2 : RObject false          |
|                            |
|o2 = [1] FALSE              |
|                            |
|o2 : RObject of type logical|
+----------------------------+

Another logical vector without a Macaulay2 equivalent is NA.

See also
========

  * NA -- missing value
  * new RObject from List -- create an R vector
    from a list
  * not RObject -- logical negation of an R object
  * RObject and RObject -- logical conjunction of R
    objects

Ways to use this method:
========================

  * new RObject from Boolean -- create an R
    logical vector from a Boolean
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:182:0.

new RObject from CC -- create an R complex vector from a complex number
***********************************************************************

  * Usage:
        RObject z
  * Inputs:
      * z, a complex number (Macaulay2Doc),
  * Outputs:
      * a R object, a complex vector of length 1;

Description
===========

Converts a Macaulay2 CC (Macaulay2Doc), (complex number) to an R
complex vector of length 1.

+----------------------------+
|i1 : RObject ii             |
|                            |
|o1 = [1] 0+1i               |
|                            |
|o1 : RObject of type complex|
+----------------------------+
|i2 : RObject(3 + 2*ii)      |
|                            |
|o2 = [1] 3+2i               |
|                            |
|o2 : RObject of type complex|
+----------------------------+

See also
========

  * new RObject from RR -- create an R double
    vector from a real or rational number
  * realPart(RObject) -- real part of an R object
  * imaginaryPart(RObject) -- imaginary part
    of an R object
  * conjugate(RObject) -- complex conjugate of
    an R object

Ways to use this method:
========================

  * new RObject from CC -- create an R complex
    vector from a complex number
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:255:0.

new RObject from HashTable -- create an R environment from a hash table
***********************************************************************

  * Usage:
        RObject t
  * Inputs:
      * t, a hash table (Macaulay2Doc), with String (Macaulay2Doc),
        keys;
  * Outputs:
      * a R object, an R environment;

Description
===========

Converts a Macaulay2 HashTable (Macaulay2Doc), with
String (Macaulay2Doc), keys to an R environment, with each key-value
pair becoming a variable binding.

+-------------------------------------------------------+
|i1 : env = RObject hashTable {"x" => 5_ZZ, "y" => 2_ZZ}|
|                                                       |
|o1 = <environment: 0x7f304675ff90>                     |
|                                                       |
|o1 : RObject of type environment                       |
+-------------------------------------------------------+
|i2 : RValue("x^y", Environment => env)                 |
|                                                       |
|o2 = [1] 25                                            |
|                                                       |
|o2 : RObject of type double                            |
+-------------------------------------------------------+
|i3 : value oo                                          |
|                                                       |
|o3 = 25                                                |
|                                                       |
|o3 : RR (of precision 53)                              |
+-------------------------------------------------------+

Ways to use this method:
========================

  * new RObject from HashTable -- create an
    R environment from a hash table
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:374:0.

new RObject from List -- create an R vector from a list
*******************************************************

  * Usage:
        RObject L
  * Inputs:
      * L, a list (Macaulay2Doc),
  * Outputs:
      * a R object, an R vector whose type depends on the
        elements of L;

Description
===========

Converts a Macaulay2 List (Macaulay2Doc), to an R vector using R's c
function.  The type of the resulting vector is determined by the elements:

+--------------------------------------------------------+
|i1 : RObject {true, false, true, false}                 |
|                                                        |
|o1 = [1]  TRUE FALSE  TRUE FALSE                        |
|                                                        |
|o1 : RObject of type logical                            |
+--------------------------------------------------------+
|i2 : RObject {2, 4, 6, 8, 10}                           |
|                                                        |
|o2 = [1]  2  4  6  8 10                                 |
|                                                        |
|o2 : RObject of type integer                            |
+--------------------------------------------------------+
|i3 : RObject {0, 1/2, exp 1}                            |
|                                                        |
|o3 = [1] 0.000000 0.500000 2.718282                     |
|                                                        |
|o3 : RObject of type double                             |
+--------------------------------------------------------+
|i4 : RObject apply(3, k -> exp(2*k*pi*ii/3))            |
|                                                        |
|o4 = [1]  1.0+0.0000000i -0.5+0.8660254i -0.5-0.8660254i|
|                                                        |
|o4 : RObject of type complex                            |
+--------------------------------------------------------+
|i5 : RObject {"foo", "bar", "baz"}                      |
|                                                        |
|o5 = [1] "foo" "bar" "baz"                              |
|                                                        |
|o5 : RObject of type character                          |
+--------------------------------------------------------+

When any elements are Option (Macaulay2Doc), objects, the keys
become names in R.

+------------------------------------+
|i6 : RObject {foo => 1, bar => 2}   |
|                                    |
|o6 = foo bar                        |
|       1   2                        |
|                                    |
|o6 : RObject of type integer        |
+------------------------------------+
|i7 : RObject {foo => 1, 2, bar => 3}|
|                                    |
|o7 = foo     bar                    |
|       1   2   3                    |
|                                    |
|o7 : RObject of type integer        |
+------------------------------------+

See also
========

  * new RObject from Sequence -- create an R
    pairlist from a sequence

Ways to use this method:
========================

  * new RObject from List -- create an R vector
    from a list
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:328:0.

new RObject from Matrix -- create an R matrix from a Macaulay2 matrix
*********************************************************************

  * Usage:
        RObject A
  * Inputs:
      * A, a matrix (Macaulay2Doc),
  * Outputs:
      * a R object, an R matrix;

Description
===========

Converts a Macaulay2 Matrix (Macaulay2Doc), to an R matrix.  Since
Macaulay2 uses row-major order and R uses column-major order, the matrix is
transposed during conversion so that the displayed values match.

+----------------------------+
|i1 : A = random(ZZ^2, ZZ^3) |
|                            |
|o1 = | 8 3 8 |              |
|     | 1 7 3 |              |
|                            |
|              2       3     |
|o1 : Matrix ZZ  <-- ZZ      |
+----------------------------+
|i2 : RObject A              |
|                            |
|o2 =      [,1] [,2] [,3]    |
|     [1,]    8    3    8    |
|     [2,]    1    7    3    |
|                            |
|o2 : RObject of type integer|
+----------------------------+

Note that value(RObject), does not undo this
transposition, so value and RObject are not exact inverses when applied to
matrices.

+-----------------------------+
|i3 : value oo                |
|                             |
|o3 = {{8, 1}, {3, 7}, {8, 3}}|
|                             |
|o3 : List                    |
+-----------------------------+
|i4 : A == transpose matrix oo|
|                             |
|o4 = true                    |
+-----------------------------+

See also
========

  * value(RObject) -- convert R object to Macaulay2

Ways to use this method:
========================

  * new RObject from Matrix -- create an R
    matrix from a Macaulay2 matrix
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:404:0.

new RObject from Nothing -- create an R NULL object
***************************************************

  * Usage:
        RObject null
  * Inputs:
      *
  * Outputs:
      * a R object, R's NULL;

Description
===========

Converts Macaulay2's null (Macaulay2Doc), to R's NULL.

+-------------------------+
|i1 : RObject null        |
|                         |
|o1 = NULL                |
|                         |
|o1 : RObject of type NULL|
+-------------------------+

Note that the null coalescing operator ?? (Macaulay2Doc), treats R's
NULL as null.

+-------------------------------+
|i2 : (?? RObject null) === null|
|                               |
|o2 = true                      |
+-------------------------------+
|i3 : RObject null ?? RObject 5 |
|                               |
|o3 = [1] 5                     |
|                               |
|o3 : RObject of type integer   |
+-------------------------------+

See also
========

  * RObject -- R object
  * value(RObject) -- convert R object to Macaulay2

Ways to use this method:
========================

  * new RObject from Nothing -- create an R
    NULL object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:155:0.

new RObject from RR -- create an R double vector from a real or rational number
*******************************************************************************

  * Usage:
        RObject x
  * Inputs:
      * x, a real number (Macaulay2Doc),
  * Outputs:
      * a R object, a double vector of length 1;

Description
===========

Converts a Macaulay2 RR (Macaulay2Doc), (floating-point real number)
to an R double vector of length 1.

+---------------------------+
|i1 : RObject pi            |
|                           |
|o1 = [1] 3.141593          |
|                           |
|o1 : RObject of type double|
+---------------------------+

See QQ (Macaulay2Doc), and other Number (Macaulay2Doc),
subtypes are also converted to R double vectors.

+---------------------------+
|i2 : RObject (3/2)         |
|                           |
|o2 = [1] 1.5               |
|                           |
|o2 : RObject of type double|
+---------------------------+

See also
========

  * new RObject from ZZ -- create an R integer
    vector from an integer
  * new RObject from CC -- create an R complex
    vector from a complex number

Ways to use this method:
========================

  * "new RObject from Number"
  * new RObject from RR -- create an R double
    vector from a real or rational number
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:230:0.

new RObject from Sequence -- create an R pairlist from a sequence
*****************************************************************

  * Usage:
        RObject s
  * Inputs:
      * s, a sequence (Macaulay2Doc),
  * Outputs:
      * a R object, a pairlist;

Description
===========

Converts a Macaulay2 Sequence (Macaulay2Doc), to an R pairlist,
the linked-list type used internally by R for function argument lists.

+-----------------------------+
|i1 : RObject (2, 3, 5)       |
|                             |
|o1 = [[1]]                   |
|     [1] 2                   |
|                             |
|     [[2]]                   |
|     [1] 3                   |
|                             |
|     [[3]]                   |
|     [1] 5                   |
|                             |
|                             |
|o1 : RObject of type pairlist|
+-----------------------------+

When any elements are Option (Macaulay2Doc), objects, the keys
become names.

+---------------------------------+
|i2 : RObject (baz => 3, qux => 4)|
|                                 |
|o2 = $baz                        |
|     [1] 3                       |
|                                 |
|     $qux                        |
|     [1] 4                       |
|                                 |
|                                 |
|o2 : RObject of type pairlist    |
+---------------------------------+

See also
========

  * new RObject from List -- create an R vector
    from a list

Ways to use this method:
========================

  * new RObject from Sequence -- create an R
    pairlist from a sequence
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:353:0.

new RObject from String -- create an R character vector from a string
*********************************************************************

  * Usage:
        RObject s
  * Inputs:
      * s, a string (Macaulay2Doc),
  * Outputs:
      * a R object, a character vector of length 1;

Description
===========

Converts a Macaulay2 String (Macaulay2Doc), to an R character
vector of length 1.

+------------------------------+
|i1 : RObject "Hello, world!"  |
|                              |
|o1 = [1] "Hello, world!"      |
|                              |
|o1 : RObject of type character|
+------------------------------+

See also
========

  * new RObject from Symbol -- create an R
    character vector from a symbol

Ways to use this method:
========================

  * new RObject from String -- create an R
    character vector from a string
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:276:0.

new RObject from Symbol -- create an R character vector from a symbol
*********************************************************************

  * Usage:
        RObject s
  * Inputs:
      * s, a symbol (Macaulay2Doc),
  * Outputs:
      * a R object, a character vector of length 1;

Description
===========

Converts a Macaulay2 Symbol (Macaulay2Doc), to an R character
vector of length 1.

+------------------------------+
|i1 : RObject foo              |
|                              |
|o1 = [1] "foo"                |
|                              |
|o1 : RObject of type character|
+------------------------------+

See also
========

  * new RObject from String -- create an R
    character vector from a string

Ways to use this method:
========================

  * new RObject from Symbol -- create an R
    character vector from a symbol
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:297:0.

new RObject from ZZ -- create an R integer vector from an integer
*****************************************************************

  * Usage:
        RObject n
  * Inputs:
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * a R object, an integer vector of length 1;

Description
===========

Converts a Macaulay2 ZZ (Macaulay2Doc), to an R integer vector of
length 1.

+----------------------------+
|i1 : RObject 1              |
|                            |
|o1 = [1] 1                  |
|                            |
|o1 : RObject of type integer|
+----------------------------+

See also
========

  * new RObject from RR -- create an R double
    vector from a real or rational number

Ways to use this method:
========================

  * new RObject from ZZ -- create an R integer
    vector from an integer
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:202:0.

NA -- missing value
*******************

Description
===========

NA is an RObject, indicating a missing value.  It is a logical
vector of length 1.

+----------------------------+
|i1 : NA                     |
|                            |
|o1 = [1] NA                 |
|                            |
|o1 : RObject of type logical|
+----------------------------+

For the programmer
==================

The object NA, is a R object.

-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/objects.m2:417:0.

value(RObject) -- convert R object to Macaulay2
***********************************************

  * Function: value (Macaulay2Doc),
  * Usage:
        value x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a thing (Macaulay2Doc), the Macaulay2 equivalent of x;

Description
===========

If possible, the Macaulay2 equivalent of the given RObject, is
returned.

Note that most R objects are vectors.  When a vector has length 1, the
corresponding Macaulay2 object is returned as a scalar.

When the input is R's NULL, see null (Macaulay2Doc), is returned.

+-------------------------+
|i1 : x = RObject null    |
|                         |
|o1 = NULL                |
|                         |
|o1 : RObject of type NULL|
+-------------------------+
|i2 : value x === null    |
|                         |
|o2 = true                |
+-------------------------+

When the input is a logical vector, a Boolean (Macaulay2Doc), is
returned.

+----------------------------+
|i3 : x = RObject true       |
|                            |
|o3 = [1] TRUE               |
|                            |
|o3 : RObject of type logical|
+----------------------------+
|i4 : value x                |
|                            |
|o4 = true                   |
+----------------------------+

When the input is an integer vector, a ZZ (Macaulay2Doc), object is
returned.

+----------------------------+
|i5 : x = RObject 5          |
|                            |
|o5 = [1] 5                  |
|                            |
|o5 : RObject of type integer|
+----------------------------+
|i6 : value x                |
|                            |
|o6 = 5                      |
+----------------------------+

When the input is a double vector, a RR (Macaulay2Doc), object is
returned.

+---------------------------+
|i7 : x = RObject (3/2)     |
|                           |
|o7 = [1] 1.5               |
|                           |
|o7 : RObject of type double|
+---------------------------+
|i8 : value x               |
|                           |
|o8 = 1.5                   |
|                           |
|o8 : RR (of precision 53)  |
+---------------------------+

When the input is a complex vector, a CC (Macaulay2Doc), object is
returned.

+----------------------------+
|i9 : x = RObject ii         |
|                            |
|o9 = [1] 0+1i               |
|                            |
|o9 : RObject of type complex|
+----------------------------+
|i10 : value x               |
|                            |
|o10 = ii                    |
|                            |
|o10 : CC (of precision 53)  |
+----------------------------+

When the input is a character vector, a String (Macaulay2Doc),
object is returned.

+-------------------------------+
|i11 : x = RObject foo          |
|                               |
|o11 = [1] "foo"                |
|                               |
|o11 : RObject of type character|
+-------------------------------+
|i12 : value x                  |
|                               |
|o12 = foo                      |
+-------------------------------+

When the input is a vector with more than one element, a List (Macaulay2Doc),
object is returned.

+------------------------------+
|i13 : x = RObject {1, 3, 5, 7}|
|                              |
|o13 = [1] 1 3 5 7             |
|                              |
|o13 : RObject of type integer |
+------------------------------+
|i14 : value x                 |
|                              |
|o14 = {1, 3, 5, 7}            |
|                              |
|o14 : List                    |
+------------------------------+

When the input is a pairlist (R's linked list type), a Sequence (Macaulay2Doc),
is returned.

+------------------------------+
|i15 : x = RObject (3, 6, 9)   |
|                              |
|o15 = [[1]]                   |
|      [1] 3                   |
|                              |
|      [[2]]                   |
|      [1] 6                   |
|                              |
|      [[3]]                   |
|      [1] 9                   |
|                              |
|                              |
|o15 : RObject of type pairlist|
+------------------------------+
|i16 : value x                 |
|                              |
|o16 = (3, 6, 9)               |
|                              |
|o16 : Sequence                |
+------------------------------+

There also exists a list type in R, created by the function list, that may
contain elements of of any type, much like Macaulay2 lists.  When the input is
such a list, a List (Macaulay2Doc), object is returned.

+------------------------------+
|i17 : RList = RFunction "list"|
|                              |
|o17 = RList                   |
|                              |
|o17 : RFunction               |
+------------------------------+
|i18 : x = RList(2, 4, 6, 8)   |
|                              |
|o18 = [[1]]                   |
|      [1] 2                   |
|                              |
|      [[2]]                   |
|      [1] 4                   |
|                              |
|      [[3]]                   |
|      [1] 6                   |
|                              |
|      [[4]]                   |
|      [1] 8                   |
|                              |
|                              |
|o18 : RObject of type list    |
+------------------------------+
|i19 : value x                 |
|                              |
|o19 = {2, 4, 6, 8}            |
|                              |
|o19 : List                    |
+------------------------------+

When the input is a matrix or array, a nested List (Macaulay2Doc),
object is returned.  Note that R uses column-major order for matrices, unlike
Macaulay2, which uses row-major order.  No attempt is made to change the order,
unlike new RObject from Matrix, which does do
this conversion.  For the most part, value and RObject, are
inverses of one another, but this is an exception.

+------------------------------+
|i20 : A = random(ZZ^2, ZZ^3)  |
|                              |
|o20 = | 8 3 8 |               |
|      | 1 7 3 |               |
|                              |
|               2       3      |
|o20 : Matrix ZZ  <-- ZZ       |
+------------------------------+
|i21 : x = RObject A           |
|                              |
|o21 =      [,1] [,2] [,3]     |
|      [1,]    8    3    8     |
|      [2,]    1    7    3     |
|                              |
|o21 : RObject of type integer |
+------------------------------+
|i22 : value x                 |
|                              |
|o22 = {{8, 1}, {3, 7}, {8, 3}}|
|                              |
|o22 : List                    |
+------------------------------+
|i23 : A == transpose matrix oo|
|                              |
|o23 = true                    |
+------------------------------+

When the input has any names, the elements with names are returned as
Option (Macaulay2Doc), objects.

+-----------------------------------------+
|i24 : x = RObject {foo => 1, 2, bar => 3}|
|                                         |
|o24 = foo     bar                        |
|        1   2   3                        |
|                                         |
|o24 : RObject of type integer            |
+-----------------------------------------+
|i25 : value x                            |
|                                         |
|o25 = {foo => 1, 2, bar => 3}            |
|                                         |
|o25 : List                               |
+-----------------------------------------+

Ways to use this method:
========================

  * value(RObject) -- convert R object to Macaulay2
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/value.m2:90:0.

RObject _ Thing -- extract a single element of an R object
**********************************************************

  * Operator: _ (Macaulay2Doc),
  * Usage:
        x_i
  * Inputs:
      * x, a R object,
      * i, a thing (Macaulay2Doc), the index (one-based);
  * Outputs:
      * a R object, the i-th element of x;

Description
===========

Extract a single element of an R vector or list using R's [[ operator.  Note
that R uses one-based indexing.

+------------------------------------------+
|i1 : x = RObject toList(5..15)            |
|                                          |
|o1 =  [1]  5  6  7  8  9 10 11 12 13 14 15|
|                                          |
|o1 : RObject of type integer              |
+------------------------------------------+
|i2 : x_1                                  |
|                                          |
|o2 = [1] 5                                |
|                                          |
|o2 : RObject of type integer              |
+------------------------------------------+

See also
========

  * RObject Array -- extract multiple elements of an R
    object

Ways to use this method:
========================

  * RObject _ Thing -- extract a single element of an
    R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/extract.m2:25:0.

RObject _ Thing = Thing -- replace a single element of an R object
******************************************************************

  * Operator: _ (Macaulay2Doc),
  * Usage:
        x_i = e
  * Inputs:
      * x, a R object,
      * i, a thing (Macaulay2Doc), the index (one-based);
      * e, a thing (Macaulay2Doc), the replacement value;
  * Outputs:
      * a R object, a copy of x with its i-th element replaced
        by e;

Description
===========

Replace a single element of an R vector or list.  Note that this only affects
the return value; the original object x is not modified.

+------------------------------------------+
|i1 : x = RObject toList(5..15)            |
|                                          |
|o1 =  [1]  5  6  7  8  9 10 11 12 13 14 15|
|                                          |
|o1 : RObject of type integer              |
+------------------------------------------+
|i2 : x_1 = 3                              |
|                                          |
|o2 =  [1]  3  6  7  8  9 10 11 12 13 14 15|
|                                          |
|o2 : RObject of type integer              |
+------------------------------------------+
|i3 : x                                    |
|                                          |
|o3 =  [1]  5  6  7  8  9 10 11 12 13 14 15|
|                                          |
|o3 : RObject of type integer              |
+------------------------------------------+

See also
========

  * RObject _ Thing -- extract a single element of an
    R object
  * RObject SPACE Array = Thing -- replace
    multiple elements of an R object

Ways to use this method:
========================

  * RObject _ Thing = Thing -- replace a
    single element of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/extract.m2:51:0.

RObject Array -- extract multiple elements of an R object
*********************************************************

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        x[i, j, ...]
  * Inputs:
      * x, a R object,
      * an array (Macaulay2Doc), indices i, j, and so on
        (one-based);
  * Outputs:
      * a R object, the elements of x at the given indices;

Description
===========

Extract multiple elements of an R vector or list using R's [ operator.

+------------------------------------------+
|i1 : x = RObject toList(5..15)            |
|                                          |
|o1 =  [1]  5  6  7  8  9 10 11 12 13 14 15|
|                                          |
|o1 : RObject of type integer              |
+------------------------------------------+
|i2 : x[1, 4..8]                           |
|                                          |
|o2 = [1]  5  8  9 10 11 12                |
|                                          |
|o2 : RObject of type integer              |
+------------------------------------------+

See also
========

  * RObject _ Thing -- extract a single element of an
    R object

Ways to use this method:
========================

  * RObject Array -- extract multiple elements of an R
    object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/extract.m2:76:0.

RObject SPACE Array = Thing -- replace multiple elements of an R object
***********************************************************************

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        x[i, j, ...] = e
  * Inputs:
      * x, a R object,
      * an array (Macaulay2Doc), indices i, j, and so on
        (one-based);
      * e, a thing (Macaulay2Doc), the replacement values;
  * Outputs:
      * a R object, a copy of x with elements at the given
        indices replaced;

Description
===========

Replace multiple elements of an R vector or list.  Note that this only affects
the return value; the original object x is not modified.

+------------------------------------------+
|i1 : x = RObject toList(5..15)            |
|                                          |
|o1 =  [1]  5  6  7  8  9 10 11 12 13 14 15|
|                                          |
|o1 : RObject of type integer              |
+------------------------------------------+
|i2 : x[1..4, 8] = {1, 2, 3, 4, 5}         |
|                                          |
|o2 =  [1]  1  2  3  4  9 10 11  5 13 14 15|
|                                          |
|o2 : RObject of type integer              |
+------------------------------------------+
|i3 : x                                    |
|                                          |
|o3 =  [1]  5  6  7  8  9 10 11 12 13 14 15|
|                                          |
|o3 : RObject of type integer              |
+------------------------------------------+

See also
========

  * RObject Array -- extract multiple elements of an R
    object
  * RObject _ Thing = Thing -- replace a
    single element of an R object

Ways to use this method:
========================

  * RObject SPACE Array = Thing -- replace
    multiple elements of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/extract.m2:102:0.

iterator(RObject) -- iterate through an R object
************************************************

  * Function: iterator (Macaulay2Doc),
  * Usage:
        iterator x
  * Inputs:
      * x, a R object,
  * Outputs:
      * an iterator (Macaulay2Doc),

Description
===========

This returns an Iterator (Macaulay2Doc), object that may be used
to iterate through x.

+-------------------------------------------------+
|i1 : i = iterator (RSymbol "iris")_"Petal.Length"|
|                                                 |
|o1 = i                                           |
|                                                 |
|o1 : Iterator                                    |
+-------------------------------------------------+
|i2 : next i                                      |
|                                                 |
|o2 = [1] 1.4                                     |
|                                                 |
|o2 : RObject of type double                      |
+-------------------------------------------------+
|i3 : next i                                      |
|                                                 |
|o3 = [1] 1.4                                     |
|                                                 |
|o3 : RObject of type double                      |
+-------------------------------------------------+
|i4 : next i                                      |
|                                                 |
|o4 = [1] 1.3                                     |
|                                                 |
|o4 : RObject of type double                      |
+-------------------------------------------------+

Ways to use this method:
========================

  * iterator(RObject) -- iterate through an R
    object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/iteration.m2:22:0.

length(RObject) -- the length of an R object
********************************************

  * Function: length (Macaulay2Doc),
  * Usage:
        length x
  * Inputs:
      * x, a R object,
  * Outputs:
      * an integer (Macaulay2Doc),

Description
===========

This function returns the length of an RObject.

+-------------------------------------------+
|i1 : length (RSymbol "iris")_"Petal.Length"|
|                                           |
|o1 = 150                                   |
+-------------------------------------------+

Ways to use this method:
========================

  * length(RObject) -- the length of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/iteration.m2:40:0.

RObject + RObject -- add R objects
**********************************

  * Operator: + (Macaulay2Doc),
  * Usage:
        x + y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the sum of x and y;

Description
===========

Add two R objects.

+----------------------------+
|i1 : x = RObject 5          |
|                            |
|o1 = [1] 5                  |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 2          |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x + y                  |
|                            |
|o3 = [1] 7                  |
|                            |
|o3 : RObject of type integer|
+----------------------------+

It may also be used as a unary operator.

+----------------------------+
|i4 : +x                     |
|                            |
|o4 = [1] 5                  |
|                            |
|o4 : RObject of type integer|
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------------------------+
|i5 : x + 2                  |
|                            |
|o5 = [1] 7                  |
|                            |
|o5 : RObject of type integer|
+----------------------------+
|i6 : 5 + y                  |
|                            |
|o6 = [1] 7                  |
|                            |
|o6 : RObject of type integer|
+----------------------------+

See also
========

  * RObject - RObject -- subtract R objects
  * RObject * RObject -- multiply R objects

Ways to use this method:
========================

  * "+ RObject"
  * RObject + RObject -- add R objects
  * "RObject + Thing"
  * "Thing + RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/arithmetic.m2:41:0.

RObject - RObject -- subtract R objects
***************************************

  * Operator: - (Macaulay2Doc),
  * Usage:
        x - y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the difference of x and y;

Description
===========

Subtract two R objects.

+----------------------------+
|i1 : x = RObject 5          |
|                            |
|o1 = [1] 5                  |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 2          |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x - y                  |
|                            |
|o3 = [1] 3                  |
|                            |
|o3 : RObject of type integer|
+----------------------------+

It may also be used as a unary operator.

+----------------------------+
|i4 : -x                     |
|                            |
|o4 = [1] -5                 |
|                            |
|o4 : RObject of type integer|
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------------------------+
|i5 : x - 2                  |
|                            |
|o5 = [1] 3                  |
|                            |
|o5 : RObject of type integer|
+----------------------------+
|i6 : 5 - y                  |
|                            |
|o6 = [1] 3                  |
|                            |
|o6 : RObject of type integer|
+----------------------------+

See also
========

  * RObject + RObject -- add R objects
  * RObject * RObject -- multiply R objects

Ways to use this method:
========================

  * "- RObject"
  * RObject - RObject -- subtract R objects
  * "RObject - Thing"
  * "Thing - RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/arithmetic.m2:78:0.

RObject * RObject -- multiply R objects
***************************************

  * Operator: * (Macaulay2Doc),
  * Usage:
        x * y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the product of x and y;

Description
===========

Multiply two R objects.

+----------------------------+
|i1 : x = RObject 5          |
|                            |
|o1 = [1] 5                  |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 2          |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x * y                  |
|                            |
|o3 = [1] 10                 |
|                            |
|o3 : RObject of type integer|
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------------------------+
|i4 : x * 2                  |
|                            |
|o4 = [1] 10                 |
|                            |
|o4 : RObject of type integer|
+----------------------------+
|i5 : 5 * y                  |
|                            |
|o5 = [1] 10                 |
|                            |
|o5 : RObject of type integer|
+----------------------------+

See also
========

  * RObject / RObject -- divide R objects
  * product(RObject) -- product of elements of an
    R object

Ways to use this method:
========================

  * RObject * RObject -- multiply R objects
  * "RObject * Thing"
  * "Thing * RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/arithmetic.m2:110:0.

RObject / RObject -- divide R objects
*************************************

  * Operator: / (Macaulay2Doc),
  * Usage:
        x / y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the quotient of x and y;

Description
===========

Divide two R objects.

+----------------------------+
|i1 : x = RObject 5          |
|                            |
|o1 = [1] 5                  |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 2          |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x / y                  |
|                            |
|o3 = [1] 2.5                |
|                            |
|o3 : RObject of type double |
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+---------------------------+
|i4 : x / 2                 |
|                           |
|o4 = [1] 2.5               |
|                           |
|o4 : RObject of type double|
+---------------------------+
|i5 : 5 / y                 |
|                           |
|o5 = [1] 2.5               |
|                           |
|o5 : RObject of type double|
+---------------------------+

See also
========

  * RObject * RObject -- multiply R objects
  * RObject // RObject -- floor division of R
    objects
  * RObject % RObject -- modulo of R objects

Ways to use this method:
========================

  * RObject / RObject -- divide R objects
  * "RObject / Thing"
  * "Thing / RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/arithmetic.m2:143:0.

RObject ^ RObject -- exponentiation of R objects
************************************************

  * Operator: ^ (Macaulay2Doc),
  * Usage:
        x ^ y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, x raised to the y power;

Description
===========

Raise one R object to the power of another.

+----------------------------+
|i1 : x = RObject 5          |
|                            |
|o1 = [1] 5                  |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 2          |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x^y                    |
|                            |
|o3 = [1] 25                 |
|                            |
|o3 : RObject of type double |
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+---------------------------+
|i4 : x^2                   |
|                           |
|o4 = [1] 25                |
|                           |
|o4 : RObject of type double|
+---------------------------+
|i5 : 5^y                   |
|                           |
|o5 = [1] 25                |
|                           |
|o5 : RObject of type double|
+---------------------------+

See also
========

  * RObject * RObject -- multiply R objects
  * sqrt(RObject) -- square root of an R object
  * exp(RObject) -- exponential of an R object

Ways to use this method:
========================

  * RObject ^ RObject -- exponentiation of R objects
  * "RObject ^ Thing"
  * "Thing ^ RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/arithmetic.m2:176:0.

RObject % RObject -- modulo of R objects
****************************************

  * Operator: % (Macaulay2Doc),
  * Usage:
        x % y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the remainder when x is divided by y;

Description
===========

Compute the modulo of two R objects, wrapping R's %%.

+----------------------------+
|i1 : x = RObject 5          |
|                            |
|o1 = [1] 5                  |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 2          |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x % y                  |
|                            |
|o3 = [1] 1                  |
|                            |
|o3 : RObject of type integer|
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------------------------+
|i4 : x % 2                  |
|                            |
|o4 = [1] 1                  |
|                            |
|o4 : RObject of type integer|
+----------------------------+
|i5 : 5 % y                  |
|                            |
|o5 = [1] 1                  |
|                            |
|o5 : RObject of type integer|
+----------------------------+

See also
========

  * RObject // RObject -- floor division of R
    objects
  * RObject / RObject -- divide R objects

Ways to use this method:
========================

  * RObject % RObject -- modulo of R objects
  * "RObject % Thing"
  * "Thing % RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/arithmetic.m2:208:0.

RObject // RObject -- floor division of R objects
*************************************************

  * Operator: // (Macaulay2Doc),
  * Usage:
        x // y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the floor quotient of x divided by y;

Description
===========

Perform floor division (integer division) of two R objects, wrapping R's %/%.

+----------------------------+
|i1 : x = RObject 5          |
|                            |
|o1 = [1] 5                  |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 2          |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x // y                 |
|                            |
|o3 = [1] 2                  |
|                            |
|o3 : RObject of type integer|
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------------------------+
|i4 : x // 2                 |
|                            |
|o4 = [1] 2                  |
|                            |
|o4 : RObject of type integer|
+----------------------------+
|i5 : 5 // y                 |
|                            |
|o5 = [1] 2                  |
|                            |
|o5 : RObject of type integer|
+----------------------------+

See also
========

  * RObject % RObject -- modulo of R objects
  * RObject / RObject -- divide R objects

Ways to use this method:
========================

  * RObject // RObject -- floor division of R
    objects
  * "RObject // Thing"
  * "Thing // RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/arithmetic.m2:241:0.

RObject : RObject -- R colon operator
*************************************

  * Operator: _colon_ (Macaulay2Doc),
  * Usage:
        x : y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the sequence of integers from x to y;

Description
===========

Generate the sequence between two numbers with step size 1 (or -1 if the first
number is greater than the second).  This operator is available both as :, as
in R, or .., its Macaulay2 equivalent.

+----------------------------+
|i1 : x = RObject 2          |
|                            |
|o1 = [1] 2                  |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 7          |
|                            |
|o2 = [1] 7                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x:y                    |
|                            |
|o3 = [1] 2 3 4 5 6 7        |
|                            |
|o3 : RObject of type integer|
+----------------------------+
|i4 : y:x                    |
|                            |
|o4 = [1] 7 6 5 4 3 2        |
|                            |
|o4 : RObject of type integer|
+----------------------------+
|i5 : x..y                   |
|                            |
|o5 = [1] 2 3 4 5 6 7        |
|                            |
|o5 : RObject of type integer|
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed. An exception is that
when using the : operator and the first argument given is a Macaulay2 ZZ (Macaulay2Doc),
object, see ZZ _colon_ Thing (Macaulay2Doc),
will be called instead.

+----------------------------+
|i6 : x:7                    |
|                            |
|o6 = [1] 2 3 4 5 6 7        |
|                            |
|o6 : RObject of type integer|
+----------------------------+
|i7 : 2:y                    |
|                            |
|o7 = ([1] 7, [1] 7)         |
|                            |
|o7 : Sequence               |
+----------------------------+
|i8 : 2..y                   |
|                            |
|o8 = [1] 2 3 4 5 6 7        |
|                            |
|o8 : RObject of type integer|
+----------------------------+

See also
========

  * RObject + RObject -- add R objects

Ways to use this method:
========================

  * RObject _colon_ RObject -- R colon operator
  * "RObject : Thing"
  * "Thing : RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/arithmetic.m2:284:0.

RObject == RObject -- equality of R objects
*******************************************

  * Operator: == (Macaulay2Doc),
  * Usage:
        x == y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

Test whether two R objects are equal.

+----------------------------+
|i1 : x = RObject 5          |
|                            |
|o1 = [1] 5                  |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 2          |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x == y                 |
|                            |
|o3 = false                  |
+----------------------------+
|i4 : x == x                 |
|                            |
|o4 = true                   |
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+-----------+
|i5 : x == 5|
|           |
|o5 = true  |
+-----------+
|i6 : 5 == y|
|           |
|o6 = false |
+-----------+

Note that these operators return Macaulay2 Boolean (Macaulay2Doc),
objects and not R logical vectors.  In particular, they
are not useful for comparing vectors of length greater than 1.  To do this, you
may use RFunction, to get the corresponding R operator as a
function.

+-------------------------------------------+
|i7 : (RFunction "==")({1, 2, 3}, {2, 2, 2})|
|                                           |
|o7 = [1] FALSE  TRUE FALSE                 |
|                                           |
|o7 : RObject of type logical               |
+-------------------------------------------+

See also
========

  * RObject ? RObject -- comparison of R objects

Ways to use this method:
========================

  * RObject == RObject -- equality of R objects
  * "RObject == Thing"
  * "Thing == RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/relational.m2:44:0.

RObject ? RObject -- comparison of R objects
********************************************

  * Operator: ? (Macaulay2Doc),
  * Usage:
        x < y
        x > y
        x <= y
        x >= y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

The standard comparison operators work on R objects.

+----------------------------+
|i1 : x = RObject 5          |
|                            |
|o1 = [1] 5                  |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 2          |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x > y                  |
|                            |
|o3 = true                   |
+----------------------------+
|i4 : x < y                  |
|                            |
|o4 = false                  |
+----------------------------+
|i5 : x >= y                 |
|                            |
|o5 = true                   |
+----------------------------+
|i6 : x <= y                 |
|                            |
|o6 = false                  |
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------+
|i7 : x > 2|
|          |
|o7 = true |
+----------+
|i8 : 5 < y|
|          |
|o8 = false|
+----------+

Note that these operators return Macaulay2 Boolean (Macaulay2Doc),
objects and not R logical vectors.  In particular, they
are not useful for comparing vectors of length greater than 1.  To do this, you
may use RFunction, to get the corresponding R operator as a
function.

+-------------------------------------------+
|i9 : (RFunction ">=")({1, 2, 3}, {2, 2, 2})|
|                                           |
|o9 = [1] FALSE  TRUE  TRUE                 |
|                                           |
|o9 : RObject of type logical               |
+-------------------------------------------+

Internally, these operators are implemented via Macaulay2's ? (Macaulay2Doc),
method, which returns <, >, ==, or incomparable (Macaulay2Doc).

See also
========

  * RObject == RObject -- equality of R objects

Ways to use this method:
========================

  * RObject ? RObject -- comparison of R objects
  * "RObject ? Thing"
  * "Thing ? RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/relational.m2:93:0.

not RObject -- logical negation of an R object
**********************************************

  * Operator: not (Macaulay2Doc),
  * Usage:
        not x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise logical negation of x;

Description
===========

Compute the logical negation of an R logical vector.

+----------------------------+
|i1 : not RObject true       |
|                            |
|o1 = [1] FALSE              |
|                            |
|o1 : RObject of type logical|
+----------------------------+

When the input contains multiple elements, the output will also contain
multiple elements.

+-------------------------------------------+
|i2 : not RObject {true, false, true, false}|
|                                           |
|o2 = [1] FALSE  TRUE FALSE  TRUE           |
|                                           |
|o2 : RObject of type logical               |
+-------------------------------------------+

See also
========

  * RObject and RObject -- logical conjunction of R
    objects
  * RObject or RObject -- logical disjunction of R
    objects
  * RObject xor RObject -- logical exclusive
    disjunction of R objects

Ways to use this method:
========================

  * not RObject -- logical negation of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/logical.m2:31:0.

RObject and RObject -- logical conjunction of R objects
*******************************************************

  * Operator: and (Macaulay2Doc),
  * Usage:
        x and y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the element-wise logical conjunction of x
        and y;

Description
===========

Compute the element-wise logical conjunction of two R logical vectors, calling
R's &.

+-----------------------------------+
|i1 : RObject true and RObject false|
|                                   |
|o1 = [1] FALSE                     |
|                                   |
|o1 : RObject of type logical       |
+-----------------------------------+

When the inputs contain multiple elements, the output will also contain
multiple elements.

+-----------------------------------------------------------------------------+
|i2 : RObject {true, true, false, false} and RObject {true, false, true,      |
|                                                                             |
|o2 = [1]  TRUE FALSE FALSE FALSE                                             |
|                                                                             |
|o2 : RObject of type logical                                                 |
|-----------------------------------------------------------------------------|
|false}                                                                       |
+-----------------------------------------------------------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------------------------------------------------------------------+
|i3 : RObject {true, true, false, false} and {true, false, true, false}|
|                                                                      |
|o3 = [1]  TRUE FALSE FALSE FALSE                                      |
|                                                                      |
|o3 : RObject of type logical                                          |
+----------------------------------------------------------------------+

See also
========

  * not RObject -- logical negation of an R object
  * RObject or RObject -- logical disjunction of R
    objects
  * RObject xor RObject -- logical exclusive
    disjunction of R objects
  * RObject & RObject -- bitwise AND of R objects

Ways to use this method:
========================

  * RObject and RObject -- logical conjunction of R
    objects
  * "RObject and Thing"
  * "Thing and RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/logical.m2:68:0.

RObject or RObject -- logical disjunction of R objects
******************************************************

  * Operator: or (Macaulay2Doc),
  * Usage:
        x or y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the element-wise logical disjunction of x
        and y;

Description
===========

Compute the element-wise logical disjunction of two R logical vectors, calling
R's |.

+----------------------------------+
|i1 : RObject true or RObject false|
|                                  |
|o1 = [1] TRUE                     |
|                                  |
|o1 : RObject of type logical      |
+----------------------------------+

When the inputs contain multiple elements, the output will also contain
multiple elements.

+-----------------------------------------------------------------------------+
|i2 : RObject {true, true, false, false} or RObject {true, false, true, false}|
|                                                                             |
|o2 = [1]  TRUE  TRUE  TRUE FALSE                                             |
|                                                                             |
|o2 : RObject of type logical                                                 |
+-----------------------------------------------------------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+---------------------------------------------------------------------+
|i3 : {true, true, false, false} or RObject {true, false, true, false}|
|                                                                     |
|o3 = [1]  TRUE  TRUE  TRUE FALSE                                     |
|                                                                     |
|o3 : RObject of type logical                                         |
+---------------------------------------------------------------------+

See also
========

  * not RObject -- logical negation of an R object
  * RObject and RObject -- logical conjunction of R
    objects
  * RObject xor RObject -- logical exclusive
    disjunction of R objects
  * RObject | RObject -- bitwise OR of R objects

Ways to use this method:
========================

  * RObject or RObject -- logical disjunction of R
    objects
  * "RObject or Thing"
  * "Thing or RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/logical.m2:105:0.

RObject xor RObject -- logical exclusive disjunction of R objects
*****************************************************************

  * Operator: xor (Macaulay2Doc),
  * Usage:
        x xor y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the element-wise exclusive disjunction of x
        and y;

Description
===========

Compute the element-wise exclusive disjunction of two R logical vectors,
calling R's xor.

+-----------------------------------+
|i1 : RObject true xor RObject false|
|                                   |
|o1 = [1] TRUE                      |
|                                   |
|o1 : RObject of type logical       |
+-----------------------------------+
|i2 : RObject true xor RObject true |
|                                   |
|o2 = [1] FALSE                     |
|                                   |
|o2 : RObject of type logical       |
+-----------------------------------+

When the inputs contain multiple elements, the output will also contain
multiple elements.

+-----------------------------------------------------------------------------+
|i3 : RObject {true, true, false, false} xor RObject {true, false, true,      |
|                                                                             |
|o3 = [1] FALSE  TRUE  TRUE FALSE                                             |
|                                                                             |
|o3 : RObject of type logical                                                 |
|-----------------------------------------------------------------------------|
|false}                                                                       |
+-----------------------------------------------------------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------------------------------------------------------------------+
|i4 : RObject {true, true, false, false} xor {true, false, true, false}|
|                                                                      |
|o4 = [1] FALSE  TRUE  TRUE FALSE                                      |
|                                                                      |
|o4 : RObject of type logical                                          |
+----------------------------------------------------------------------+

See also
========

  * not RObject -- logical negation of an R object
  * RObject and RObject -- logical conjunction of R
    objects
  * RObject or RObject -- logical disjunction of R
    objects
  * RObject ^^ RObject -- bitwise XOR of R objects

Ways to use this method:
========================

  * RObject xor RObject -- logical exclusive
    disjunction of R objects
  * "RObject xor Thing"
  * "Thing xor RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/logical.m2:143:0.

~ RObject -- bitwise NOT of an R object, or create a one-sided formula
**********************************************************************

  * Operator: ~ (Macaulay2Doc),
  * Usage:
        ~x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the bitwise NOT of x (integer or real
        input),; or a one-sided R formula ~x (all other inputs)

Description
===========

For integer and real R vectors, see ~ (Macaulay2Doc), computes bitwise NOT,
calling R's bitwNot.

+----------------------------+
|i1 : x = RObject 12         |
|                            |
|o1 = [1] 12                 |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : ~x                     |
|                            |
|o2 = [1] -13                |
|                            |
|o2 : RObject of type integer|
+----------------------------+

For all other types, see ~ (Macaulay2Doc), creates a one-sided R formula,
equivalent to R's ~x.  This is the same operator used for two-sided formulas;
see RObject ~ RObject.

+-----------------------------+
|i3 : ~ RQuote "x"            |
|                             |
|o3 = .Primitive("~")(x)      |
|                             |
|o3 : RObject of type language|
+-----------------------------+

See also
========

  * RObject ~ RObject -- create a two-sided R formula
  * RObject & RObject -- bitwise AND of R objects
  * RObject | RObject -- bitwise OR of R objects
  * RObject ^^ RObject -- bitwise XOR of R objects
  * not RObject -- logical negation of an R object

Ways to use this method:
========================

  * ~ RObject -- bitwise NOT of an R object, or create a
    one-sided formula
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/bitwise.m2:37:0.

RObject & RObject -- bitwise AND of R objects
*********************************************

  * Operator: & (Macaulay2Doc),
  * Usage:
        x & y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the bitwise AND of x and y;

Description
===========

Compute the bitwise AND of two R integer vectors, calling R's bitwAnd.

+----------------------------+
|i1 : x = RObject 12         |
|                            |
|o1 = [1] 12                 |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 10         |
|                            |
|o2 = [1] 10                 |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x & y                  |
|                            |
|o3 = [1] 8                  |
|                            |
|o3 : RObject of type integer|
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------------------------+
|i4 : x & 10                 |
|                            |
|o4 = [1] 8                  |
|                            |
|o4 : RObject of type integer|
+----------------------------+

See also
========

  * ~ RObject -- bitwise NOT of an R object, or create a
    one-sided formula
  * RObject | RObject -- bitwise OR of R objects
  * RObject ^^ RObject -- bitwise XOR of R objects
  * RObject and RObject -- logical conjunction of R
    objects

Ways to use this method:
========================

  * RObject & RObject -- bitwise AND of R objects
  * "RObject & Thing"
  * "Thing & RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/bitwise.m2:71:0.

RObject | RObject -- bitwise OR of R objects
********************************************

  * Operator: | (Macaulay2Doc),
  * Usage:
        x | y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the bitwise OR of x and y;

Description
===========

Compute the bitwise OR of two R integer vectors, calling R's bitwOr.

+----------------------------+
|i1 : x = RObject 12         |
|                            |
|o1 = [1] 12                 |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 10         |
|                            |
|o2 = [1] 10                 |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x | y                  |
|                            |
|o3 = [1] 14                 |
|                            |
|o3 : RObject of type integer|
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------------------------+
|i4 : 12 | y                 |
|                            |
|o4 = [1] 14                 |
|                            |
|o4 : RObject of type integer|
+----------------------------+

See also
========

  * ~ RObject -- bitwise NOT of an R object, or create a
    one-sided formula
  * RObject & RObject -- bitwise AND of R objects
  * RObject ^^ RObject -- bitwise XOR of R objects
  * RObject or RObject -- logical disjunction of R
    objects

Ways to use this method:
========================

  * RObject | RObject -- bitwise OR of R objects
  * "RObject | Thing"
  * "Thing | RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/bitwise.m2:105:0.

RObject ^^ RObject -- bitwise XOR of R objects
**********************************************

  * Operator: ^^ (Macaulay2Doc),
  * Usage:
        x ^^ y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, the bitwise XOR of x and y;

Description
===========

Compute the bitwise XOR of two R integer vectors, calling R's bitwXor.

+----------------------------+
|i1 : x = RObject 12         |
|                            |
|o1 = [1] 12                 |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 10         |
|                            |
|o2 = [1] 10                 |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x ^^ y                 |
|                            |
|o3 = [1] 6                  |
|                            |
|o3 : RObject of type integer|
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------------------------+
|i4 : 12 ^^ y                |
|                            |
|o4 = [1] 6                  |
|                            |
|o4 : RObject of type integer|
+----------------------------+

See also
========

  * ~ RObject -- bitwise NOT of an R object, or create a
    one-sided formula
  * RObject & RObject -- bitwise AND of R objects
  * RObject | RObject -- bitwise OR of R objects
  * RObject xor RObject -- logical exclusive
    disjunction of R objects

Ways to use this method:
========================

  * RObject ^^ RObject -- bitwise XOR of R objects
  * "RObject ^^ Thing"
  * "Thing ^^ RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/bitwise.m2:139:0.

RObject << RObject -- bitwise left shift of an R object
*******************************************************

  * Operator: << (Macaulay2Doc),
  * Usage:
        x << y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, x shifted left by y bits;

Description
===========

Compute the bitwise left shift of an R integer vector, calling R's bitwShiftL.

+----------------------------+
|i1 : x = RObject 12         |
|                            |
|o1 = [1] 12                 |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 2          |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x << y                 |
|                            |
|o3 = [1] 48                 |
|                            |
|o3 : RObject of type integer|
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------------------------+
|i4 : x << 2                 |
|                            |
|o4 = [1] 48                 |
|                            |
|o4 : RObject of type integer|
+----------------------------+

See also
========

  * RObject >> RObject -- bitwise right shift of an
    R object

Ways to use this method:
========================

  * RObject << RObject -- bitwise left shift of an R
    object
  * "RObject << Thing"
  * "Thing << RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/bitwise.m2:170:0.

RObject >> RObject -- bitwise right shift of an R object
********************************************************

  * Operator: >> (Macaulay2Doc),
  * Usage:
        x >> y
  * Inputs:
      * x, a R object,
      * y, a R object,
  * Outputs:
      * a R object, x shifted right by y bits;

Description
===========

Compute the bitwise right shift of an R integer vector, calling R's bitwShiftR.

+----------------------------+
|i1 : x = RObject 12         |
|                            |
|o1 = [1] 12                 |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : y = RObject 2          |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : x << y                 |
|                            |
|o3 = [1] 48                 |
|                            |
|o3 : RObject of type integer|
+----------------------------+
|i4 : oo >> y                |
|                            |
|o4 = [1] 12                 |
|                            |
|o4 : RObject of type integer|
+----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

+----------------------------+
|i5 : x >> 2                 |
|                            |
|o5 = [1] 3                  |
|                            |
|o5 : RObject of type integer|
+----------------------------+

See also
========

  * RObject << RObject -- bitwise left shift of an R
    object

Ways to use this method:
========================

  * RObject >> RObject -- bitwise right shift of an
    R object
  * "RObject >> Thing"
  * "Thing >> RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/bitwise.m2:202:0.

ceiling(RObject) -- ceiling of an R object
******************************************

  * Function: ceiling (Macaulay2Doc),
  * Usage:
        ceiling x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise ceiling of x;

Description
===========

Round each element of x up to the nearest integer, calling R's ceiling.

+---------------------------+
|i1 : x = RObject exp 1     |
|                           |
|o1 = [1] 2.718282          |
|                           |
|o1 : RObject of type double|
+---------------------------+
|i2 : ceiling x             |
|                           |
|o2 = [1] 3                 |
|                           |
|o2 : RObject of type double|
+---------------------------+

See also
========

  * floor(RObject) -- floor of an R object
  * truncate(RObject) -- truncation of an R
    object
  * round(RObject) -- rounding of an R
    object

Ways to use this method:
========================

  * ceiling(RObject) -- ceiling of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/rounding.m2:28:0.

floor(RObject) -- floor of an R object
**************************************

  * Function: floor (Macaulay2Doc),
  * Usage:
        floor x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise floor of x;

Description
===========

Round each element of x down to the nearest integer, calling R's floor.

+---------------------------+
|i1 : x = RObject exp 1     |
|                           |
|o1 = [1] 2.718282          |
|                           |
|o1 : RObject of type double|
+---------------------------+
|i2 : floor x               |
|                           |
|o2 = [1] 2                 |
|                           |
|o2 : RObject of type double|
+---------------------------+

See also
========

  * ceiling(RObject) -- ceiling of an R object
  * truncate(RObject) -- truncation of an R
    object
  * round(RObject) -- rounding of an R
    object

Ways to use this method:
========================

  * floor(RObject) -- floor of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/rounding.m2:52:0.

truncate(RObject) -- truncation of an R object
**********************************************

  * Function: truncate (Macaulay2Doc),
  * Usage:
        truncate x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise truncation of x toward
        zero;

Description
===========

Round each element of x toward zero, calling R's trunc.

+---------------------------+
|i1 : x = RObject exp 1     |
|                           |
|o1 = [1] 2.718282          |
|                           |
|o1 : RObject of type double|
+---------------------------+
|i2 : truncate x            |
|                           |
|o2 = [1] 2                 |
|                           |
|o2 : RObject of type double|
+---------------------------+
|i3 : truncate(-x)          |
|                           |
|o3 = [1] -2                |
|                           |
|o3 : RObject of type double|
+---------------------------+

See also
========

  * ceiling(RObject) -- ceiling of an R object
  * floor(RObject) -- floor of an R object
  * round(RObject) -- rounding of an R
    object

Ways to use this method:
========================

  * truncate(RObject) -- truncation of an R
    object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/rounding.m2:77:0.

round(RObject,RObject) -- rounding of an R object
*************************************************

  * Function: round (Macaulay2Doc),
  * Usage:
        round x
        round(x, n)
  * Inputs:
      * x, a R object,
      * n, a R object, number of decimal places (default 0);

Description
===========

Round each element of x to the nearest integer, calling R's round, which rounds
to even (banker's rounding), just as in Macaulay2.

+---------------------------+
|i1 : round RObject 2.5     |
|                           |
|o1 = [1] 2                 |
|                           |
|o1 : RObject of type double|
+---------------------------+
|i2 : round RObject 3.5     |
|                           |
|o2 = [1] 4                 |
|                           |
|o2 : RObject of type double|
+---------------------------+

An optional second argument, or equivalently a digits option, specifies the
number of decimal places to use when rounding.

+---------------------------+
|i3 : x = RObject exp 1     |
|                           |
|o3 = [1] 2.718282          |
|                           |
|o3 : RObject of type double|
+---------------------------+
|i4 : round(x, 2)           |
|                           |
|o4 = [1] 2.72              |
|                           |
|o4 : RObject of type double|
+---------------------------+
|i5 : round(x, digits => 3) |
|                           |
|o5 = [1] 2.718             |
|                           |
|o5 : RObject of type double|
+---------------------------+

See also
========

  * ceiling(RObject) -- ceiling of an R object
  * floor(RObject) -- floor of an R object
  * truncate(RObject) -- truncation of an R
    object

Ways to use this method:
========================

  * "round(RObject)"
  * round(RObject,RObject) -- rounding of
    an R object
  * "round(RObject,Thing)"
  * "round(Thing,RObject)"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/rounding.m2:112:0.

max(RObject) -- maximum of an R object
**************************************

  * Function: max (Macaulay2Doc),
  * Usage:
        max x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the maximum value in x;

Description
===========

Return the maximum value of an R vector.

+----------------------------+
|i1 : x = RObject {1, 3, 5}  |
|                            |
|o1 = [1] 1 3 5              |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : max x                  |
|                            |
|o2 = [1] 5                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+

See also
========

  * min(RObject) -- minimum of an R object

Ways to use this method:
========================

  * max(RObject) -- maximum of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/stats.m2:25:0.

min(RObject) -- minimum of an R object
**************************************

  * Function: min (Macaulay2Doc),
  * Usage:
        min x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the minimum value in x;

Description
===========

Return the minimum value of an R vector.

+----------------------------+
|i1 : x = RObject {1, 3, 5}  |
|                            |
|o1 = [1] 1 3 5              |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : min x                  |
|                            |
|o2 = [1] 1                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+

See also
========

  * max(RObject) -- maximum of an R object

Ways to use this method:
========================

  * min(RObject) -- minimum of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/stats.m2:46:0.

sum(RObject) -- sum of elements of an R object
**********************************************

  * Function: sum (Macaulay2Doc),
  * Usage:
        sum x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the sum of all values in x;

Description
===========

Return the sum of all values in an R vector. This wraps R's sum function.

+----------------------------+
|i1 : x = RObject {2, 4, 6}  |
|                            |
|o1 = [1] 2 4 6              |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : sum x                  |
|                            |
|o2 = [1] 12                 |
|                            |
|o2 : RObject of type integer|
+----------------------------+

See also
========

  * product(RObject) -- product of elements of an
    R object
  * max(RObject) -- maximum of an R object
  * min(RObject) -- minimum of an R object

Ways to use this method:
========================

  * sum(RObject) -- sum of elements of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/stats.m2:70:0.

product(RObject) -- product of elements of an R object
******************************************************

  * Function: product (Macaulay2Doc),
  * Usage:
        product x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the product of all values in x;

Description
===========

Return the product of all values in an R vector. This wraps R's prod function.

+----------------------------+
|i1 : x = RObject {2, 4, 6}  |
|                            |
|o1 = [1] 2 4 6              |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : product x              |
|                            |
|o2 = [1] 48                 |
|                            |
|o2 : RObject of type double |
+----------------------------+

See also
========

  * sum(RObject) -- sum of elements of an R object
  * RObject * RObject -- multiply R objects

Ways to use this method:
========================

  * product(RObject) -- product of elements of an
    R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/stats.m2:93:0.

abs(RObject) -- absolute value of an R object
*********************************************

  * Function: abs (Macaulay2Doc),
  * Usage:
        abs x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise absolute value of x;

Description
===========

Compute the absolute value of each element of an R numeric vector, calling R's
abs.

+----------------------------+
|i1 : x = RObject(-2)        |
|                            |
|o1 = [1] -2                 |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : abs x                  |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+

See also
========

  * sqrt(RObject) -- square root of an R object

Ways to use this method:
========================

  * abs(RObject) -- absolute value of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/exp-log.m2:26:0.

sqrt(RObject) -- square root of an R object
*******************************************

  * Function: sqrt (Macaulay2Doc),
  * Usage:
        sqrt x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise square root of x;

Description
===========

Compute the square root of each element of an R numeric vector, calling R's
sqrt.

+----------------------------+
|i1 : x = RObject 2          |
|                            |
|o1 = [1] 2                  |
|                            |
|o1 : RObject of type integer|
+----------------------------+
|i2 : sqrt x                 |
|                            |
|o2 = [1] 1.414214           |
|                            |
|o2 : RObject of type double |
+----------------------------+

See also
========

  * abs(RObject) -- absolute value of an R object
  * RObject ^ RObject -- exponentiation of R objects
  * exp(RObject) -- exponential of an R object

Ways to use this method:
========================

  * sqrt(RObject) -- square root of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/exp-log.m2:50:0.

exp(RObject) -- exponential of an R object
******************************************

  * Function: exp (Macaulay2Doc),
  * Usage:
        exp x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise exponential of x;

Description
===========

Compute e raised to the power of each element of an R numeric vector, calling
R's exp.

+---------------------------+
|i1 : exp RObject 1         |
|                           |
|o1 = [1] 2.718282          |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * expm1(RObject) -- exponential minus 1 of an R
    object
  * log(RObject) -- natural logarithm of an R object

Ways to use this method:
========================

  * exp(RObject) -- exponential of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/exp-log.m2:72:0.

expm1(RObject) -- exponential minus 1 of an R object
****************************************************

  * Function: expm1 (Macaulay2Doc),
  * Usage:
        expm1 x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise value of e^x - 1;

Description
===========

Compute e^x - 1 for each element of an R numeric vector, calling R's expm1.
This is more accurate than exp(x) - 1 for small values of x.

+---------------------------+
|i1 : expm1 RObject 0.001   |
|                           |
|o1 = [1] 0.0010005         |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * exp(RObject) -- exponential of an R object
  * log1p(RObject) -- natural logarithm of 1 plus an
    R object

Ways to use this method:
========================

  * expm1(RObject) -- exponential minus 1 of an R
    object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/exp-log.m2:95:0.

log(RObject) -- natural logarithm of an R object
************************************************

  * Function: log (Macaulay2Doc),
  * Usage:
        log x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise natural logarithm of x;

Description
===========

Compute the natural logarithm of each element of an R numeric vector, calling
R's log.

+---------------------------+
|i1 : log RObject exp 2     |
|                           |
|o1 = [1] 2                 |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * log1p(RObject) -- natural logarithm of 1 plus an
    R object
  * exp(RObject) -- exponential of an R object

Ways to use this method:
========================

  * log(RObject) -- natural logarithm of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/exp-log.m2:117:0.

log1p(RObject) -- natural logarithm of 1 plus an R object
*********************************************************

  * Function: log1p (Macaulay2Doc),
  * Usage:
        log1p x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise value of log(1 + x);

Description
===========

Compute log(1 + x) for each element of an R numeric vector, calling R's log1p.
This is more accurate than log(1 + x) for small values of x.

+---------------------------+
|i1 : log1p RObject 0.001   |
|                           |
|o1 = [1] 0.0009995003      |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * log(RObject) -- natural logarithm of an R object
  * expm1(RObject) -- exponential minus 1 of an R
    object

Ways to use this method:
========================

  * log1p(RObject) -- natural logarithm of 1 plus an
    R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/exp-log.m2:140:0.

acos(RObject) -- arccosine of an R object
*****************************************

  * Function: acos (Macaulay2Doc),
  * Usage:
        acos x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise arccosine of x, in
        radians;

Description
===========

Compute the arccosine of each element of an R numeric vector, calling R's acos.

+---------------------------+
|i1 : acos RObject 1        |
|                           |
|o1 = [1] 0                 |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * cos(RObject) -- cosine of an R object
  * asin(RObject) -- arcsine of an R object
  * atan(RObject) -- arctangent of an R object

Ways to use this method:
========================

  * acos(RObject) -- arccosine of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/trig.m2:27:0.

asin(RObject) -- arcsine of an R object
***************************************

  * Function: asin (Macaulay2Doc),
  * Usage:
        asin x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise arcsine of x, in radians;

Description
===========

Compute the arcsine of each element of an R numeric vector, calling R's asin.

+---------------------------+
|i1 : asin RObject 1        |
|                           |
|o1 = [1] 1.570796          |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * sin(RObject) -- sine of an R object
  * acos(RObject) -- arccosine of an R object
  * atan(RObject) -- arctangent of an R object

Ways to use this method:
========================

  * asin(RObject) -- arcsine of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/trig.m2:50:0.

atan(RObject) -- arctangent of an R object
******************************************

  * Function: atan (Macaulay2Doc),
  * Usage:
        atan x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise arctangent of x, in
        radians;

Description
===========

Compute the arctangent of each element of an R numeric vector, calling R's
atan.

+---------------------------+
|i1 : atan RObject 1        |
|                           |
|o1 = [1] 0.7853982         |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * tan(RObject) -- tangent of an R object
  * acos(RObject) -- arccosine of an R object
  * asin(RObject) -- arcsine of an R object
  * atan2(RObject,RObject) -- two-argument
    arctangent of R objects

Ways to use this method:
========================

  * atan(RObject) -- arctangent of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/trig.m2:74:0.

atan2(RObject,RObject) -- two-argument arctangent of R objects
**************************************************************

  * Function: atan2 (Macaulay2Doc),
  * Usage:
        atan2(y, x)
  * Inputs:
      * y, a R object,
      * x, a R object,
  * Outputs:
      * a R object, the element-wise arctangent of y/x, in
        radians;

Description
===========

Compute the two-argument arctangent (i.e., the angle in radians between the
positive x-axis and the point (x, y)), calling R's atan2.

+-----------------------------+
|i1 : atan2(RObject 1, -1)    |
|                             |
|o1 = [1] 2.356194            |
|                             |
|o1 : RObject of type double  |
+-----------------------------+
|i2 : atan2(sqrt 3, RObject 1)|
|                             |
|o2 = [1] 1.047198            |
|                             |
|o2 : RObject of type double  |
+-----------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

See also
========

  * atan(RObject) -- arctangent of an R object

Ways to use this method:
========================

  * atan2(RObject,RObject) -- two-argument
    arctangent of R objects
  * "atan2(RObject,Thing)"
  * "atan2(Thing,RObject)"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/trig.m2:103:0.

cos(RObject) -- cosine of an R object
*************************************

  * Function: cos (Macaulay2Doc),
  * Usage:
        cos x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise cosine of x (in radians);

Description
===========

Compute the cosine of each element of an R numeric vector, calling R's cos.

+---------------------------+
|i1 : cos RObject pi        |
|                           |
|o1 = [1] -1                |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * acos(RObject) -- arccosine of an R object
  * sin(RObject) -- sine of an R object
  * tan(RObject) -- tangent of an R object

Ways to use this method:
========================

  * cos(RObject) -- cosine of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/trig.m2:126:0.

sin(RObject) -- sine of an R object
***********************************

  * Function: sin (Macaulay2Doc),
  * Usage:
        sin x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise sine of x (in radians);

Description
===========

Compute the sine of each element of an R numeric vector, calling R's sin.

+---------------------------+
|i1 : sin RObject pi        |
|                           |
|o1 = [1] 1.224647e-16      |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * asin(RObject) -- arcsine of an R object
  * cos(RObject) -- cosine of an R object
  * tan(RObject) -- tangent of an R object

Ways to use this method:
========================

  * sin(RObject) -- sine of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/trig.m2:149:0.

tan(RObject) -- tangent of an R object
**************************************

  * Function: tan (Macaulay2Doc),
  * Usage:
        tan x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise tangent of x (in radians);

Description
===========

Compute the tangent of each element of an R numeric vector, calling R's tan.

+---------------------------+
|i1 : tan RObject pi        |
|                           |
|o1 = [1] -1.224647e-16     |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * atan(RObject) -- arctangent of an R object
  * cos(RObject) -- cosine of an R object
  * sin(RObject) -- sine of an R object

Ways to use this method:
========================

  * tan(RObject) -- tangent of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/trig.m2:172:0.

acosh(RObject) -- hyperbolic arccosine of an R object
*****************************************************

  * Function: acosh (Macaulay2Doc),
  * Usage:
        acosh x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise hyperbolic arccosine of x;

Description
===========

Compute the hyperbolic arccosine of each element of an R numeric vector,
calling R's acosh.

+---------------------------+
|i1 : acosh RObject 1       |
|                           |
|o1 = [1] 0                 |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * cosh(RObject) -- hyperbolic cosine of an R object
  * asinh(RObject) -- hyperbolic arcsine of an R
    object
  * atanh(RObject) -- hyperbolic arctangent of an R
    object

Ways to use this method:
========================

  * acosh(RObject) -- hyperbolic arccosine of an R
    object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/hyperbolic.m2:27:0.

asinh(RObject) -- hyperbolic arcsine of an R object
***************************************************

  * Function: asinh (Macaulay2Doc),
  * Usage:
        asinh x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise hyperbolic arcsine of x;

Description
===========

Compute the hyperbolic arcsine of each element of an R numeric vector, calling
R's asinh.

+---------------------------+
|i1 : asinh RObject(3/4)    |
|                           |
|o1 = [1] 0.6931472         |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * sinh(RObject) -- hyperbolic sine of an R object
  * acosh(RObject) -- hyperbolic arccosine of an R
    object
  * atanh(RObject) -- hyperbolic arctangent of an R
    object

Ways to use this method:
========================

  * asinh(RObject) -- hyperbolic arcsine of an R
    object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/hyperbolic.m2:50:0.

atanh(RObject) -- hyperbolic arctangent of an R object
******************************************************

  * Function: atanh (Macaulay2Doc),
  * Usage:
        atanh x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise hyperbolic arctangent of
        x;

Description
===========

Compute the hyperbolic arctangent of each element of an R numeric vector,
calling R's atanh.

+---------------------------+
|i1 : atanh RObject(1/2)    |
|                           |
|o1 = [1] 0.5493061         |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * tanh(RObject) -- hyperbolic tangent of an R
    object
  * acosh(RObject) -- hyperbolic arccosine of an R
    object
  * asinh(RObject) -- hyperbolic arcsine of an R
    object

Ways to use this method:
========================

  * atanh(RObject) -- hyperbolic arctangent of an R
    object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/hyperbolic.m2:73:0.

cosh(RObject) -- hyperbolic cosine of an R object
*************************************************

  * Function: cosh (Macaulay2Doc),
  * Usage:
        cosh x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise hyperbolic cosine of x;

Description
===========

Compute the hyperbolic cosine of each element of an R numeric vector, calling
R's cosh.

+---------------------------+
|i1 : cosh RObject 0        |
|                           |
|o1 = [1] 1                 |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * acosh(RObject) -- hyperbolic arccosine of an R
    object
  * sinh(RObject) -- hyperbolic sine of an R object
  * tanh(RObject) -- hyperbolic tangent of an R
    object

Ways to use this method:
========================

  * cosh(RObject) -- hyperbolic cosine of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/hyperbolic.m2:96:0.

sinh(RObject) -- hyperbolic sine of an R object
***********************************************

  * Function: sinh (Macaulay2Doc),
  * Usage:
        sinh x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise hyperbolic sine of x;

Description
===========

Compute the hyperbolic sine of each element of an R numeric vector, calling R's
sinh.

+---------------------------+
|i1 : sinh RObject 0        |
|                           |
|o1 = [1] 0                 |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * asinh(RObject) -- hyperbolic arcsine of an R
    object
  * cosh(RObject) -- hyperbolic cosine of an R object
  * tanh(RObject) -- hyperbolic tangent of an R
    object

Ways to use this method:
========================

  * sinh(RObject) -- hyperbolic sine of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/hyperbolic.m2:119:0.

tanh(RObject) -- hyperbolic tangent of an R object
**************************************************

  * Function: tanh (Macaulay2Doc),
  * Usage:
        tanh x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise hyperbolic tangent of x;

Description
===========

Compute the hyperbolic tangent of each element of an R numeric vector, calling
R's tanh.

+---------------------------+
|i1 : tanh RObject 0        |
|                           |
|o1 = [1] 0                 |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * atanh(RObject) -- hyperbolic arctangent of an R
    object
  * cosh(RObject) -- hyperbolic cosine of an R object
  * sinh(RObject) -- hyperbolic sine of an R object

Ways to use this method:
========================

  * tanh(RObject) -- hyperbolic tangent of an R
    object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/hyperbolic.m2:142:0.

conjugate(RObject) -- complex conjugate of an R object
******************************************************

  * Function: conjugate (Macaulay2Doc),
  * Usage:
        conjugate z
  * Inputs:
      * z, a R object,
  * Outputs:
      * a R object, the element-wise complex conjugate of z;

Description
===========

Compute the complex conjugate of each element of an R complex vector, calling
R's Conj.

+----------------------------+
|i1 : z = RObject(3 + 2*ii)  |
|                            |
|o1 = [1] 3+2i               |
|                            |
|o1 : RObject of type complex|
+----------------------------+
|i2 : conjugate z            |
|                            |
|o2 = [1] 3-2i               |
|                            |
|o2 : RObject of type complex|
+----------------------------+

See also
========

  * realPart(RObject) -- real part of an R object
  * imaginaryPart(RObject) -- imaginary part
    of an R object

Ways to use this method:
========================

  * conjugate(RObject) -- complex conjugate of
    an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/complex.m2:27:0.

imaginaryPart(RObject) -- imaginary part of an R object
*******************************************************

  * Function: imaginaryPart (Macaulay2Doc),
  * Usage:
        imaginaryPart z
  * Inputs:
      * z, a R object,
  * Outputs:
      * a R object, the element-wise imaginary part of z;

Description
===========

Extract the imaginary part of each element of an R complex vector, calling R's
Im.

+----------------------------+
|i1 : z = RObject(3 + 2*ii)  |
|                            |
|o1 = [1] 3+2i               |
|                            |
|o1 : RObject of type complex|
+----------------------------+
|i2 : imaginaryPart z        |
|                            |
|o2 = [1] 2                  |
|                            |
|o2 : RObject of type double |
+----------------------------+

See also
========

  * realPart(RObject) -- real part of an R object
  * conjugate(RObject) -- complex conjugate of
    an R object

Ways to use this method:
========================

  * imaginaryPart(RObject) -- imaginary part
    of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/complex.m2:73:0.

realPart(RObject) -- real part of an R object
*********************************************

  * Function: realPart (Macaulay2Doc),
  * Usage:
        realPart z
  * Inputs:
      * z, a R object,
  * Outputs:
      * a R object, the element-wise real part of z;

Description
===========

Extract the real part of each element of an R complex vector, calling R's Re.

+----------------------------+
|i1 : z = RObject(3 + 2*ii)  |
|                            |
|o1 = [1] 3+2i               |
|                            |
|o1 : RObject of type complex|
+----------------------------+
|i2 : realPart z             |
|                            |
|o2 = [1] 3                  |
|                            |
|o2 : RObject of type double |
+----------------------------+

See also
========

  * imaginaryPart(RObject) -- imaginary part
    of an R object
  * conjugate(RObject) -- complex conjugate of
    an R object

Ways to use this method:
========================

  * realPart(RObject) -- real part of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/complex.m2:50:0.

Beta(RObject,RObject) -- beta function of R objects
***************************************************

  * Function: Beta (Macaulay2Doc),
  * Usage:
        Beta(a, b)
  * Inputs:
      * a, a R object,
      * b, a R object,
  * Outputs:
      * a R object, the beta function B(a, b);

Description
===========

Compute the beta function of two R numeric vectors, calling R's beta.

+-------------------------------+
|i1 : Beta(RObject 1, RObject 2)|
|                               |
|o1 = [1] 0.5                   |
|                               |
|o1 : RObject of type double    |
+-------------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

See also
========

  * Gamma(RObject) -- gamma function of an R object
  * binomial(RObject,RObject), --
    binomial coefficient of R objects

Ways to use this method:
========================

  * Beta(RObject,RObject) -- beta function
    of R objects
  * "Beta(RObject,Thing)"
  * "Beta(Thing,RObject)"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/special.m2:32:0.

Digamma(RObject) -- digamma function of an R object
***************************************************

  * Function: Digamma (Macaulay2Doc),
  * Usage:
        Digamma x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise digamma function of x;

Description
===========

Compute the digamma function (the derivative of the log-gamma function) of each
element of an R numeric vector, calling R's digamma.

+---------------------------+
|i1 : Digamma RObject 2     |
|                           |
|o1 = [1] 0.4227843         |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * Gamma(RObject) -- gamma function of an R object
  * lngamma(RObject) -- log-gamma function of an R
    object

Ways to use this method:
========================

  * Digamma(RObject) -- digamma function of an R
    object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/special.m2:54:0.

Gamma(RObject) -- gamma function of an R object
***********************************************

  * Function: Gamma (Macaulay2Doc),
  * Usage:
        Gamma x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise gamma function of x;

Description
===========

Compute the gamma function of each element of an R numeric vector, calling R's
gamma.

+---------------------------+
|i1 : Gamma RObject 2       |
|                           |
|o1 = [1] 1                 |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * lngamma(RObject) -- log-gamma function of an R
    object
  * Digamma(RObject) -- digamma function of an R
    object
  * Beta(RObject,RObject) -- beta function
    of R objects

Ways to use this method:
========================

  * Gamma(RObject) -- gamma function of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/special.m2:77:0.

lngamma(RObject) -- log-gamma function of an R object
*****************************************************

  * Function: lngamma (Macaulay2Doc),
  * Usage:
        lngamma x
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise log of the gamma function
        of x;

Description
===========

Compute the natural logarithm of the gamma function of each element of an R
numeric vector, calling R's lgamma.

+---------------------------+
|i1 : lngamma RObject 2     |
|                           |
|o1 = [1] 0                 |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * Gamma(RObject) -- gamma function of an R object
  * Digamma(RObject) -- digamma function of an R
    object

Ways to use this method:
========================

  * lngamma(RObject) -- log-gamma function of an R
    object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/special.m2:99:0.

binomial(RObject,RObject) -- binomial coefficient of R objects
**************************************************************

  * Function: binomial (Macaulay2Doc),
  * Usage:
        binomial(n, k)
  * Inputs:
      * n, a R object,
      * k, a R object,
  * Outputs:
      * an integer (Macaulay2Doc),

Description
===========

Compute the binomial coefficient of two R numeric vectors, calling R's choose.

+-----------------------------------+
|i1 : binomial(RObject 4, RObject 2)|
|                                   |
|o1 = [1] 6                         |
|                                   |
|o1 : RObject of type double        |
+-----------------------------------+

One of the operands may be a Macaulay2 object.  It will be converted to an
RObject, before the operation is performed.

See also
========

  * RObject ! -- factorial of an R object
  * Beta(RObject,RObject) -- beta function
    of R objects

Ways to use this method:
========================

  * binomial(RObject,RObject), --
    binomial coefficient of R objects
  * "binomial(RObject,Thing)"
  * "binomial(Thing,RObject)"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/special.m2:125:0.

RObject ! -- factorial of an R object
*************************************

  * Operator: ! (Macaulay2Doc),
  * Usage:
        x!
  * Inputs:
      * x, a R object,
  * Outputs:
      * a R object, the element-wise factorial of x;

Description
===========

Compute the factorial of each element of an R numeric vector, calling R's
factorial.

+---------------------------+
|i1 : (RObject 3)!          |
|                           |
|o1 = [1] 6                 |
|                           |
|o1 : RObject of type double|
+---------------------------+

See also
========

  * binomial(RObject,RObject), --
    binomial coefficient of R objects
  * Gamma(RObject) -- gamma function of an R object

Ways to use this method:
========================

  * RObject ! -- factorial of an R object
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/special.m2:147:0.

RObject ~ RObject -- create a two-sided R formula
*************************************************

  * Operator: ~ (Macaulay2Doc),
  * Usage:
        y ~ x
  * Inputs:
      * y, a R object,
      * x, a R object,
  * Outputs:
      * a R object, a two-sided formula y ~ x;

Description
===========

Create a two-sided R formula using R's ~ operator. Formulas are used throughout
R's statistical modeling functions to specify relationships between variables.

+-----------------------------+
|i1 : RQuote mpg ~ RQuote wt  |
|                             |
|o1 = .Primitive("~")(mpg, wt)|
|                             |
|o1 : RObject of type language|
+-----------------------------+

To create a one-sided formula (right-hand side only), use the unary form; see
~ RObject.

See also
========

  * ~ RObject -- bitwise NOT of an R object, or create a
    one-sided formula

Ways to use this method:
========================

  * RObject ~ RObject -- create a two-sided R formula
  * "RObject ~ Thing"
  * "Thing ~ RObject"
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/formulas.m2:28:0.

RFunction -- R function
***********************

  * Usage:
        RFunction x
  * Inputs:
      * x, a string (Macaulay2Doc), or a thing (Macaulay2Doc),
        specifying an R function;
  * Outputs:
      * an instance of the type RFunction,

Description
===========

An RFunction is a function that wraps around an R function specified by a
string.  Its arguments are converted to RObject,'s.

+----------------------------------------+
|i1 : qnorm = RFunction "qnorm"          |
|                                        |
|o1 = qnorm                              |
|                                        |
|o1 : RFunction                          |
+----------------------------------------+
|i2 : qnorm(0.025, "lower.tail" => false)|
|                                        |
|o2 = [1] 1.959964                       |
|                                        |
|o2 : RObject of type double             |
+----------------------------------------+

Any Macaulay2 object may also be used; it is converted to a string with
toString (Macaulay2Doc).

+----------------------------------------------------------------------------+
|i3 : RFunction sin                                                          |
|                                                                            |
|o3 = RFunction[../../../../../Macaulay2/packages/RInterface.m2:149:4-154:15]|
|                                                                            |
|o3 : RFunction                                                              |
+----------------------------------------------------------------------------+
|i4 : oo(pi/4)                                                               |
|                                                                            |
|o4 = [1] 0.7071068                                                          |
|                                                                            |
|o4 : RObject of type double                                                 |
+----------------------------------------------------------------------------+

Methods that use an object of class RFunction:
==============================================

  * "new RFunction from RObject"
  * "new RFunction from String"
  * "new RFunction from Thing"

For the programmer
==================

The object RFunction, is a self initializing type (Macaulay2Doc),
with ancestor classes
FunctionClosure (Macaulay2Doc), < Function (Macaulay2Doc)
< Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/functions.m2:32:0.

library -- load an R package
****************************

  * Usage:
        library pkg
  * Inputs:
      * pkg, a string (Macaulay2Doc),

Description
===========

This loads an R package.  It is an RFunction, that calls R's
library function.

For example, suppose we want to load the abbey dataset with nickel content in a
Canadian syenite rock.  It is available in the MASS package.

+-----------------------------------------------------------------------------+
|i1 : library "MASS"                                                          |
|                                                                             |
|o1 = [1] "MASS"      "stats"     "graphics"  "grDevices" "utils"             |
|     [7] "methods"   "base"                                                  |
|                                                                             |
|o1 : RObject of type character                                               |
|-----------------------------------------------------------------------------|
|"datasets"                                                                   |
+-----------------------------------------------------------------------------+
|i2 : RSymbol "abbey"                                                         |
|                                                                             |
|o2 =  [1]   5.2   6.5   6.9   7.0   7.0   7.0   7.4   8.0   8.0   8.0   8.0  |
|     [13]   9.0   9.0  10.0  11.0  11.0  12.0  12.0  13.7  14.0  14.0  14.0  |
|     [25]  17.0  17.0  18.0  24.0  28.0  34.0 125.0                          |
|                                                                             |
|o2 : RObject of type double                                                  |
|-----------------------------------------------------------------------------|
| 8.5                                                                         |
|16.0                                                                         |
+-----------------------------------------------------------------------------+

For the programmer
==================

The object library, is an instance of the type RFunction.

-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/functions.m2:54:0.

RContext -- R context
*********************

Description
===========

An RContext is a wrapper around an R environment that keeps track of variable
bindings across a series of R computations.

Create an empty context with new RContext:

+-----------------------+
|i1 : ctx = new RContext|
|                       |
|o1 = ctx               |
|                       |
|o1 : RContext          |
+-----------------------+

Alternatively, pass an R code string to initialize the context with variable
bindings.  See new RContext from String.

See also
========

  * RValue -- evaluate R code

Methods that use a R context:
=============================

  * "listSymbols(RContext)" -- see listSymbols(RObject),
    -- list symbols in an R environment
  * new RContext from String -- construct an R
    context
  * "new RContext"
  * RContext _ String -- get a variable from an R
    context
  * RContext String -- evaluate R code in a context
  * use(RContext) -- import R context variables into
    Macaulay2

For the programmer
==================

The object RContext, is a self initializing type (Macaulay2Doc),
with ancestor classes
MutableHashTable (Macaulay2Doc), < HashTable (Macaulay2Doc)
< Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/context.m2:27:0.

new RContext from String -- construct an R context
**************************************************

  * Usage:
        RContext s
  * Inputs:
      * s, a string (Macaulay2Doc), R code to initialize the
        context with;
  * Outputs:
      * a R context,

Description
===========

Pass an R code string to initialize the context with variable bindings:

+----------------------------------------+
|i1 : ctx = RContext "x <- 5L; y <- x^2L"|
|                                        |
|o1 = ctx                                |
|                                        |
|o1 : RContext                           |
+----------------------------------------+
|i2 : ctx_"x"                            |
|                                        |
|o2 = [1] 5                              |
|                                        |
|o2 : RObject of type integer            |
+----------------------------------------+
|i3 : ctx_"y"                            |
|                                        |
|o3 = [1] 25                             |
|                                        |
|o3 : RObject of type double             |
+----------------------------------------+

Ways to use this method:
========================

  * new RContext from String -- construct an R
    context
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/context.m2:48:0.

RContext String -- evaluate R code in a context
***********************************************

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        ctx s
  * Inputs:
      * ctx, a R context,
      * s, a string (Macaulay2Doc), R code to evaluate;
  * Outputs:
      * a R object, result of evaluating s;

Description
===========

Evaluates R code in the R environment associated with the context. Variable
assignments persist across calls.

+----------------------------+
|i1 : ctx = new RContext     |
|                            |
|o1 = ctx                    |
|                            |
|o1 : RContext               |
+----------------------------+
|i2 : ctx "x <- 5L"          |
|                            |
|o2 = [1] 5                  |
|                            |
|o2 : RObject of type integer|
+----------------------------+
|i3 : ctx "y <- x + 1L"      |
|                            |
|o3 = [1] 6                  |
|                            |
|o3 : RObject of type integer|
+----------------------------+
|i4 : ctx "y"                |
|                            |
|o4 = [1] 6                  |
|                            |
|o4 : RObject of type integer|
+----------------------------+

Ways to use this method:
========================

  * RContext String -- evaluate R code in a context
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/context.m2:71:0.

RContext _ String -- get a variable from an R context
*****************************************************

  * Operator: _ (Macaulay2Doc),
  * Usage:
        ctx_s
  * Inputs:
      * ctx, a R context,
      * s, a string (Macaulay2Doc), variable name;
  * Outputs:
      * a R object, the value of variable s in the context;

Description
===========

Returns the value of the named variable from the R environment associated with
the context.

+------------------------------+
|i1 : ctx = RContext "x <- 42L"|
|                              |
|o1 = ctx                      |
|                              |
|o1 : RContext                 |
+------------------------------+
|i2 : ctx_"x"                  |
|                              |
|o2 = [1] 42                   |
|                              |
|o2 : RObject of type integer  |
+------------------------------+

Ways to use this method:
========================

  * RContext _ String -- get a variable from an R
    context
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/context.m2:92:0.

listSymbols(RObject) -- list symbols in an R environment
********************************************************

  * Function: listSymbols (Macaulay2Doc),
  * Usage:
        listSymbols x
  * Inputs:
      * x, a R object, or a R context, an R
        environment (type environment) or context;
  * Outputs:
      * an instance of the type TABLE (Text), an HTML table
        showing each symbol's name, R type, and value;

Description
===========

Returns a table of the symbols defined in an R environment.  When given an
RContext, the symbols in its associated environment are
listed.

+---------------------------------------------+
|i1 : ctx = RContext "x <- 5L; y <- \"hello\""|
|                                             |
|o1 = ctx                                     |
|                                             |
|o1 : RContext                                |
+---------------------------------------------+
|i2 : listSymbols ctx                         |
|                                             |
|o2 = symbol  class      value                |
|     ------  -----      -----                |
|     x       integer    [1] 5                |
|     y       character  [1] "hello"          |
+---------------------------------------------+

See also
========

  * use(RContext) -- import R context variables into
    Macaulay2

Ways to use this method:
========================

  * "listSymbols(RContext)"
  * listSymbols(RObject) -- list symbols in an
    R environment
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/context.m2:115:0.

use(RContext) -- import R context variables into Macaulay2
**********************************************************

  * Function: use (Macaulay2Doc),
  * Usage:
        use ctx
  * Inputs:
      * ctx, a R context,
  * Consequences:
      * Variables in ctx whose names do not contain _ or . are assigned to
        Macaulay2 symbols of the same name

Description
===========

Imports the variables from a context's R environment into Macaulay2's global
symbol table.

+---------------------------------------+
|i1 : ctx = RContext "a <- 5L; b <- 10L"|
|                                       |
|o1 = ctx                               |
|                                       |
|o1 : RContext                          |
+---------------------------------------+
|i2 : use ctx                           |
+---------------------------------------+
|i3 : a                                 |
|                                       |
|o3 = [1] 5                             |
|                                       |
|o3 : RObject of type integer           |
+---------------------------------------+
|i4 : b                                 |
|                                       |
|o4 = [1] 10                            |
|                                       |
|o4 : RObject of type integer           |
+---------------------------------------+

See also
========

  * listSymbols(RContext) -- list symbols in
    an R environment

Ways to use this method:
========================

  * use(RContext) -- import R context variables into
    Macaulay2
-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/context.m2:141:0.

RSymbol -- look up an R object by name
**************************************

  * Usage:
        RSymbol str
  * Inputs:
      * str, a string (Macaulay2Doc), or a thing (Macaulay2Doc),
  * Outputs:
      * a R object, the value of the R object named str;

Description
===========

Look up an R object by name, returning its value.  For example, this can be
useful for loading datasets.

+----------------------------------------------------------------------------+
|i1 : RSymbol "mtcars"                                                       |
|                                                                            |
|o1 =                      mpg cyl  disp  hp drat    wt  qsec vs am gear carb|
|     Mazda RX4           21.0   6 160.0 110 3.90 2.620 16.46  0  1    4    4|
|     Mazda RX4 Wag       21.0   6 160.0 110 3.90 2.875 17.02  0  1    4    4|
|     Datsun 710          22.8   4 108.0  93 3.85 2.320 18.61  1  1    4    1|
|     Hornet 4 Drive      21.4   6 258.0 110 3.08 3.215 19.44  1  0    3    1|
|     Hornet Sportabout   18.7   8 360.0 175 3.15 3.440 17.02  0  0    3    2|
|     Valiant             18.1   6 225.0 105 2.76 3.460 20.22  1  0    3    1|
|     Duster 360          14.3   8 360.0 245 3.21 3.570 15.84  0  0    3    4|
|     Merc 240D           24.4   4 146.7  62 3.69 3.190 20.00  1  0    4    2|
|     Merc 230            22.8   4 140.8  95 3.92 3.150 22.90  1  0    4    2|
|     Merc 280            19.2   6 167.6 123 3.92 3.440 18.30  1  0    4    4|
|     Merc 280C           17.8   6 167.6 123 3.92 3.440 18.90  1  0    4    4|
|     Merc 450SE          16.4   8 275.8 180 3.07 4.070 17.40  0  0    3    3|
|     Merc 450SL          17.3   8 275.8 180 3.07 3.730 17.60  0  0    3    3|
|     Merc 450SLC         15.2   8 275.8 180 3.07 3.780 18.00  0  0    3    3|
|     Cadillac Fleetwood  10.4   8 472.0 205 2.93 5.250 17.98  0  0    3    4|
|     Lincoln Continental 10.4   8 460.0 215 3.00 5.424 17.82  0  0    3    4|
|     Chrysler Imperial   14.7   8 440.0 230 3.23 5.345 17.42  0  0    3    4|
|     Fiat 128            32.4   4  78.7  66 4.08 2.200 19.47  1  1    4    1|
|     Honda Civic         30.4   4  75.7  52 4.93 1.615 18.52  1  1    4    2|
|     Toyota Corolla      33.9   4  71.1  65 4.22 1.835 19.90  1  1    4    1|
|     Toyota Corona       21.5   4 120.1  97 3.70 2.465 20.01  1  0    3    1|
|     Dodge Challenger    15.5   8 318.0 150 2.76 3.520 16.87  0  0    3    2|
|     AMC Javelin         15.2   8 304.0 150 3.15 3.435 17.30  0  0    3    2|
|     Camaro Z28          13.3   8 350.0 245 3.73 3.840 15.41  0  0    3    4|
|     Pontiac Firebird    19.2   8 400.0 175 3.08 3.845 17.05  0  0    3    2|
|     Fiat X1-9           27.3   4  79.0  66 4.08 1.935 18.90  1  1    4    1|
|     Porsche 914-2       26.0   4 120.3  91 4.43 2.140 16.70  0  1    5    2|
|     Lotus Europa        30.4   4  95.1 113 3.77 1.513 16.90  1  1    5    2|
|     Ford Pantera L      15.8   8 351.0 264 4.22 3.170 14.50  0  1    5    4|
|     Ferrari Dino        19.7   6 145.0 175 3.62 2.770 15.50  0  1    5    6|
|     Maserati Bora       15.0   8 301.0 335 3.54 3.570 14.60  0  1    5    8|
|     Volvo 142E          21.4   4 121.0 109 4.11 2.780 18.60  1  1    4    2|
|                                                                            |
|o1 : RObject of type list                                                   |
+----------------------------------------------------------------------------+

A Macaulay2 Symbol (Macaulay2Doc), may also be used.

+----------------------------------------------------------------------------+
|i2 : RSymbol mtcars                                                         |
|                                                                            |
|o2 =                      mpg cyl  disp  hp drat    wt  qsec vs am gear carb|
|     Mazda RX4           21.0   6 160.0 110 3.90 2.620 16.46  0  1    4    4|
|     Mazda RX4 Wag       21.0   6 160.0 110 3.90 2.875 17.02  0  1    4    4|
|     Datsun 710          22.8   4 108.0  93 3.85 2.320 18.61  1  1    4    1|
|     Hornet 4 Drive      21.4   6 258.0 110 3.08 3.215 19.44  1  0    3    1|
|     Hornet Sportabout   18.7   8 360.0 175 3.15 3.440 17.02  0  0    3    2|
|     Valiant             18.1   6 225.0 105 2.76 3.460 20.22  1  0    3    1|
|     Duster 360          14.3   8 360.0 245 3.21 3.570 15.84  0  0    3    4|
|     Merc 240D           24.4   4 146.7  62 3.69 3.190 20.00  1  0    4    2|
|     Merc 230            22.8   4 140.8  95 3.92 3.150 22.90  1  0    4    2|
|     Merc 280            19.2   6 167.6 123 3.92 3.440 18.30  1  0    4    4|
|     Merc 280C           17.8   6 167.6 123 3.92 3.440 18.90  1  0    4    4|
|     Merc 450SE          16.4   8 275.8 180 3.07 4.070 17.40  0  0    3    3|
|     Merc 450SL          17.3   8 275.8 180 3.07 3.730 17.60  0  0    3    3|
|     Merc 450SLC         15.2   8 275.8 180 3.07 3.780 18.00  0  0    3    3|
|     Cadillac Fleetwood  10.4   8 472.0 205 2.93 5.250 17.98  0  0    3    4|
|     Lincoln Continental 10.4   8 460.0 215 3.00 5.424 17.82  0  0    3    4|
|     Chrysler Imperial   14.7   8 440.0 230 3.23 5.345 17.42  0  0    3    4|
|     Fiat 128            32.4   4  78.7  66 4.08 2.200 19.47  1  1    4    1|
|     Honda Civic         30.4   4  75.7  52 4.93 1.615 18.52  1  1    4    2|
|     Toyota Corolla      33.9   4  71.1  65 4.22 1.835 19.90  1  1    4    1|
|     Toyota Corona       21.5   4 120.1  97 3.70 2.465 20.01  1  0    3    1|
|     Dodge Challenger    15.5   8 318.0 150 2.76 3.520 16.87  0  0    3    2|
|     AMC Javelin         15.2   8 304.0 150 3.15 3.435 17.30  0  0    3    2|
|     Camaro Z28          13.3   8 350.0 245 3.73 3.840 15.41  0  0    3    4|
|     Pontiac Firebird    19.2   8 400.0 175 3.08 3.845 17.05  0  0    3    2|
|     Fiat X1-9           27.3   4  79.0  66 4.08 1.935 18.90  1  1    4    1|
|     Porsche 914-2       26.0   4 120.3  91 4.43 2.140 16.70  0  1    5    2|
|     Lotus Europa        30.4   4  95.1 113 3.77 1.513 16.90  1  1    5    2|
|     Ford Pantera L      15.8   8 351.0 264 4.22 3.170 14.50  0  1    5    4|
|     Ferrari Dino        19.7   6 145.0 175 3.62 2.770 15.50  0  1    5    6|
|     Maserati Bora       15.0   8 301.0 335 3.54 3.570 14.60  0  1    5    8|
|     Volvo 142E          21.4   4 121.0 109 4.11 2.780 18.60  1  1    4    2|
|                                                                            |
|o2 : RObject of type list                                                   |
+----------------------------------------------------------------------------+

To obtain an unevaluated R symbol rather than its value, use RQuote,
instead.  For R functions, use RFunction, instead.

See also
========

  * RQuote -- create an unevaluated R symbol
  * RFunction -- R function

Ways to use RSymbol:
====================

  * "RSymbol(String)"
  * "RSymbol(Thing)"

For the programmer
==================

The object RSymbol, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/symbols.m2:31:0.

RQuote -- create an unevaluated R symbol
****************************************

  * Usage:
        RQuote str
  * Inputs:
      * str, a string (Macaulay2Doc), or a thing (Macaulay2Doc),
  * Outputs:
      * a R object, an R symbol (type symbol);

Description
===========

Create an unevaluated R symbol.  This is analogous to R's quote function, and
is useful when a symbol itself (rather than its value) needs to be passed to an
R function.

Compare the behavior of RSymbol, which evaluates the symbol and
returns its value:

+---------------------------+
|i1 : RSymbol "pi"          |
|                           |
|o1 = [1] 3.141593          |
|                           |
|o1 : RObject of type double|
+---------------------------+
|i2 : RQuote "pi"           |
|                           |
|o2 = pi                    |
|                           |
|o2 : RObject of type symbol|
+---------------------------+

A Macaulay2 Symbol (Macaulay2Doc), may also be used.

+---------------------------+
|i3 : RQuote pi             |
|                           |
|o3 = pi                    |
|                           |
|o3 : RObject of type symbol|
+---------------------------+

See also
========

  * RSymbol -- look up an R object by name

Ways to use RQuote:
===================

  * "RQuote(String)"
  * "RQuote(Thing)"

For the programmer
==================

The object RQuote, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/symbols.m2:63:0.

RValue -- evaluate R code
*************************

  * Usage:
        RValue s
  * Inputs:
      * s, a string (Macaulay2Doc), or a sequence (Macaulay2Doc),
        R code to evaluate;
  * Optional inputs (Macaulay2Doc),:
      * Environment => a R object, or a hash table (Macaulay2Doc),
        default value R_GlobalEnv, R environment for
        evaluation;
  * Outputs:
      * a R object, result of evaluating s;

Description
===========

RValue parses and evaluates R code given as a string and returns the result as
an RObject.

+---------------------------+
|i1 : RValue "choose(10, 3)"|
|                           |
|o1 = [1] 120               |
|                           |
|o1 : RObject of type double|
+---------------------------+

When given a Sequence (Macaulay2Doc), the elements are
converted to strings with toString (Macaulay2Doc), and
concatenated before evaluation.  This is useful for programmatically
constructing R code.

+---------------------------------+
|i2 : n = 5                       |
|                                 |
|o2 = 5                           |
+---------------------------------+
|i3 : RValue("factorial(", n, ")")|
|                                 |
|o3 = [1] 120                     |
|                                 |
|o3 : RObject of type double      |
+---------------------------------+

The Environment option specifies the R environment in which to evaluate the
code.

+--------------------------------------------------------+
|i4 : env = RObject hashTable {"n" => 10_ZZ, "k" => 3_ZZ}|
|                                                        |
|o4 = <environment: 0x7f3046e3d400>                      |
|                                                        |
|o4 : RObject of type environment                        |
+--------------------------------------------------------+
|i5 : RValue("choose(n, k)", Environment => env)         |
|                                                        |
|o5 = [1] 120                                            |
|                                                        |
|o5 : RObject of type double                             |
+--------------------------------------------------------+

A Macaulay2 hash table specifying values of variables with the variable names
given as strings may also be passed to the Environment option.

+-----------------------------------------+
|i6 : env2 = hashTable {"x" => 3}         |
|                                         |
|o6 = HashTable{"x" => 3}                 |
|                                         |
|o6 : HashTable                           |
+-----------------------------------------+
|i7 : RValue("x + 5", Environment => env2)|
|                                         |
|o7 = [1] 8                               |
|                                         |
|o7 : RObject of type double              |
+-----------------------------------------+

See also
========

  * RContext -- R context

Ways to use RValue:
===================

  * "RValue(Sequence)"
  * "RValue(String)"

For the programmer
==================

The object RValue, is a method function with a single argument (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in RInterface/doc/r-value.m2:46:0.