Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用mathjaxr在r包文档中获得良好的显示_R_Mathjax_R Package - Fatal编程技术网

使用mathjaxr在r包文档中获得良好的显示

使用mathjaxr在r包文档中获得良好的显示,r,mathjax,r-package,R,Mathjax,R Package,我在使用mathjaxr包时遇到了一些困难,无法在我的第一个包的文档中很好地显示它 我遵照这里的指示: 以下是我在函数之前放入R文件的内容: #' Probabilistic principal component analysis : #' parameter estimation with EM algorithm #' #' @param Y les données : une matrice de taille n x p #' @param Gamma0 point de départ

我在使用mathjaxr包时遇到了一些困难,无法在我的第一个包的文档中很好地显示它

我遵照这里的指示:

以下是我在函数之前放入R文件的内容:

#' Probabilistic principal component analysis :
#' parameter estimation with EM algorithm
#'
#' @param Y les données : une matrice de taille n x p
#' @param Gamma0 point de départ pour l'inférence de Gamma
#'
#' @return la fonction renvoie la moyenne d'un vecteur
#' @import mvtnorm
#' @import psych
#' @import mathjaxr
#' @description 
#' \loadmathjax
#' \mjdeqn{f(x) = \frac{1}{\sqrt{2\pi} \sigma} e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}#\right)^2},}
#' {f(x) = 1/(sqrt(2 pi) sigma) e^-((x - mu)^2/(2 sigma^2)),}
以下是我的描述文件中的内容:

Package: ppcaem
Title: Parameter estimation in ppca model with EM algorithm
Version: 0.0.0.9000
Authors@R: 
    person(given = "First",
           family = "Last",
           role = c("aut", "cre"),
           email = "first.last@example.com",
           comment = c(ORCID = "YOUR-ORCID-ID"))
Description: cf title
RdMacros: mathjaxr
License: GPL-3
Encoding: UTF-8
LazyData: true
Imports: 
    psych,
    mvtnorm,
    mathjaxr
RoxygenNote: 7.1.1
下面是渲染的:


我尝试了不使用roxygen的方法,如果可以的话,它可以工作