Reader small image

You're reading from  The Statistics and Machine Learning with R Workshop

Product typeBook
Published inOct 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781803240305
Edition1st Edition
Languages
Right arrow
Author (1)
Liu Peng
Liu Peng
author image
Liu Peng

Peng Liu is an Assistant Professor of Quantitative Finance (Practice) at Singapore Management University and an adjunct researcher at the National University of Singapore. He holds a Ph.D. in statistics from the National University of Singapore and has ten years of working experience as a data scientist across the banking, technology, and hospitality industries.
Read more about Liu Peng

Right arrow

Working with calculus in R

In this section, we will use the mosaicCalc package to perform calculus-related operations. The functions we will work with are mostly analytical (have explicit expression) and simple in nature. The following code snippet checks if this package is installed and will install the package if the condition evaluates to true, followed by importing the package to the current session:

if(!require("mosaicCalc")){
  install.packages("mosaicCalc")
}
library(mosaicCalc)

To avoid too much imagination, a good way to learn about unknown functions is to plot them out. Let us see how to plot a function using the mosaicCalc package.

Plotting basic functions

There are a few input parameters we need to specify upon plotting a function using the mosaicCalc package. Overall, we need to specify the expression of the function, the input variable(s), the domain of each input variable used to plot the function, and the values of other parameters...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
The Statistics and Machine Learning with R Workshop
Published in: Oct 2023Publisher: PacktISBN-13: 9781803240305

Author (1)

author image
Liu Peng

Peng Liu is an Assistant Professor of Quantitative Finance (Practice) at Singapore Management University and an adjunct researcher at the National University of Singapore. He holds a Ph.D. in statistics from the National University of Singapore and has ten years of working experience as a data scientist across the banking, technology, and hospitality industries.
Read more about Liu Peng