Book Image

Mathematica Data Analysis

By : Sergiy Suchok
Book Image

Mathematica Data Analysis

By: Sergiy Suchok

Overview of this book

There are many algorithms for data analysis and it’s not always possible to quickly choose the best one for each case. Implementation of the algorithms takes a lot of time. With the help of Mathematica, you can quickly get a result from the use of a particular method, because this system contains almost all the known algorithms for data analysis. If you are not a programmer but you need to analyze data, this book will show you the capabilities of Mathematica when just few strings of intelligible code help to solve huge tasks from statistical issues to pattern recognition. If you're a programmer, with the help of this book, you will learn how to use the library of algorithms implemented in Mathematica in your programs, as well as how to write algorithm testing procedure. With each chapter, you'll be more immersed in the special world of Mathematica. Along with intuitive queries for data processing, we will highlight the nuances and features of this system, allowing you to build effective analysis systems. With the help of this book, you will learn how to optimize the computations by combining your libraries with the Mathematica kernel.
Table of Contents (15 chapters)
Mathematica Data Analysis
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Interacting with R


If you are familiar with the R programming language and the environment for statistical studies, then you can easily transfer the accumulated material for use in Mathematica. To do this, you need to enable the RLink package and download the paclet for R using RLinkResourcesInstall:

When launching the RLinkResourcesInstall function, you will be asked to confirm the installation, and after this, the process of downloading the necessary files will start.

To start a connection with R, you need to call the InstallR function. For example, let's set the value of the myR variable using the RSet function and then read it using the REvaluate function:

With the help of the REvaluate function, you can also declare functions written in R and execute them in Mathematica. For example, let's declare a function that returns the cube of given numbers:

To avoid the repeated calling of the REvaluate function every time the thrd function is called, you can use RFunction:

In this example, we will...