【问题标题】:Roxygen2: @return mismatched braces or quotesRoxygen2:@return 不匹配的大括号或引号
【发布时间】:2021-08-29 10:27:31
【问题描述】:

我正在使用 rowxygen2(版本 7.1.1)并且无法正确解析我的函数返回列表值。输入:

#' @return A list with the following fields: 
#' \describe{
#' \item{ID}{The speaker / speaker + session identifier of the output}
#' \item{CPPS}{Smoothed Cepstral Peak Prominence value}
#' \item{HNR}{An Harmonic-to-noise estimate}
#' \item{Shim_local}{A (local) Shimmer measurement (in %)}
#' \item{Shim_local_DB}{A (local) Shimmer measurement, in decibels}
#' \item{LTAS_Slope}{The slope of the Long Time Average Spectrum (in dB)}
#' \item{LTAS_Tilt}{The Long Time Average Spectrum tilt (in dB)}
#' \item{AVQI}{Acoustic Voice Quality Index summarizing the measures above}
#' }

在通过 roxygen2 运行它时给出警告“@return 不匹配的大括号或引号”,而我在 Rd 文件的“\value”字段中什么也没有。

关于如何解决这个问题的任何想法?

【问题讨论】:

    标签: r return-value documentation-generation roxygen2


    【解决方案1】:

    那是因为“%”:

    #' \item{Shim_local}{A (local) Shimmer measurement (in %)}
    

    替换为

    #' \item{Shim_local}{A (local) Shimmer measurement (in \%)}
    

    否则,“%”后面的字符将被丢弃。

    【讨论】:

      猜你喜欢
      • 2018-03-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-20
      • 2011-11-25
      • 1970-01-01
      • 2016-10-03
      相关资源
      最近更新 更多