knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(nclCowley)
The function allows the user to pass single values.
MultiplyBy23(2) MultiplyBy23(1.5)
The user may also pass more than one parameters in the form of a vector
MultiplyBy23(1:5) MultiplyBy23(c(3, 5, 7))
This function can also be used on matrices to perform scalar multiplication
Matr = matrix(c(2,1,3,2), 2, 2) print(Matr) MultiplyBy23(Matr)
Note that passing a string to this function will produce an error.
MultiplyBy23("a")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.