knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of mypkgr is to calculate values of multivariate gaussian density and learning how to build R package.
You can install the development version of mypkgr
from GitHub with:
# install.packages("devtools") devtools::install_github("Florian-40/mypkgr")
This is a basic example which shows you how to solve a common problem:
library(mypkgr) mvnpdf(x=matrix(c(1.96,-0.5), ncol=2), Log=FALSE)
mvnpdf(x=matrix(rep(1.96,2),nrow=2, ncol=1),Log=FALSE)
pdfvalues <- mvnpdf(x=matrix(seq(-3,3, by=0.1), nrow=1), Log=FALSE) plot(pdfvalues)
C++
functions.To use C++
function, we use the code below :
Rcpp::sourceCpp("src/timesTwo.cpp") timesTwo(12.5)
And for inversion matrix :
Rcpp::sourceCpp("src/invC.cpp") A<-matrix(c(2,4,7,8,9,5,6,5,4), nrow=3, ncol=3) invC(A)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.