Macaulay2 » Documentation
Packages » RInterface :: RInterface
next | previous | forward | backward | up | index | toc

RInterface -- interface to R for statistical computing

Description

This package allows for the ability to interface with R 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)), class = "data.frame", row.names = c("Democrat", "Independent", "Republican"))
     X-squared = 30.07, df = 2, p-value = 2.954e-07


o4 : RObject of type list
i5 : value oo_"p.value"

o5 = 2.953589183211757e-7

o5 : RR (of precision 53)

Author

Version

This documentation describes version 0.1 of RInterface.

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.1}},
  author = {Doug Torrance},
  howpublished = {A \emph{Macaulay2} package available at
    \url{https://github.com/Macaulay2/M2/tree/master/M2/Macaulay2/packages}}
}

Exports

For the programmer

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


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