R “罗克西根误差”;跳过无效路径“;

R “罗克西根误差”;跳过无效路径“;,r,package,devtools,roxygen2,R,Package,Devtools,Roxygen2,运行devtools::document()的输出。我不知道如何解决这个问题,而roxygen文档在帮助找出错误消息方面也不是很好。有没有关于如何摆脱这一点的想法,以便我的功能可以被记录下来 Updating NEONExclusionZones documentation Loading NEONExclusionZones First time using roxygen2 4.0. Upgrading automatically... Writing NAMESPACE Skipping

运行devtools::document()的输出。我不知道如何解决这个问题,而roxygen文档在帮助找出错误消息方面也不是很好。有没有关于如何摆脱这一点的想法,以便我的功能可以被记录下来

Updating NEONExclusionZones documentation
Loading NEONExclusionZones
First time using roxygen2 4.0. Upgrading automatically...
Writing NAMESPACE
Skipping invalid path:  1CalcMosqImpact-TITLE.Rd 
Skipping invalid path:  1IstotopicChange-TITLE.Rd 
Skipping invalid path:  1findInters-TITLE.Rd 
Skipping invalid path:  1rad_foot-TITLE.Rd 
下面是我试图记录的其中一个函数的示例。我意识到它没有完整的文档记录,但我正在尝试让一个基本的包工作,我可以继续更新

##'NAME 
#'@name 1findInters
#'
##'TITLE 
#'@title Find intersection between footprint curve and a threshold curve
#'
##'TYPE 
#'Standalone R Function
#'
##'DESCRIPTION
#'@description Calculates where the flux footprint curve and the threshold curve intersect. 
#'
##'USAGE 
#'\dontrun{
#'  find_inters(fun_weight=impact_KM01[x,], location=x_step_airs[-1], threshold=SA_dist)
#'  }
#'  
##'ARGUMENTS 
#' @param fun_weight List of footprint curve distances
#' @param location List of distance from tower [m]
#' @param threshold Threshold for influence of all activities on tower measurement source areas [%]
#' 
##'DETAILS
#' 
#'
##'VALUE 
#'
#'
##'NOTE 
#'
##'SEE ALSO
#'
#'
#'
#'
##'EXAMPLES 
#
#'

find_inters <-  function(
  fun_weight,
  location,
  threshold
) {

  #difference between footprint curve and threshold line
  DIFF <- fun_weight - threshold

  #interpolate to ensure finding local result
  location1 <- approx(location, n=1e3)$y
  DIFF1 <- approx(x=location, y=DIFF, xout=location1)$y      

  #find intersect farthest away from tower 
  #in order to find 1 real zero crossing, at least two zero crossings have to be present. 
  #Hence I added c(-1,1) here
  WHR <- extrema(c(-Inf,Inf,DIFF1))
  if(WHR$ncross <= 1) {
    out <- NA
  } else {
    #As I added c(-1,1) above, two indices have to be subtracted again here.
    out <- round( location1[WHR$cross[WHR$ncross,2]-2] )
  }
  #return result
  return(out)

}
###名称
#“@name 1finders
#'
##"标题",
#“@title查找示意图曲线和阈值曲线之间的交点
#'
##'类型
#'独立的R函数
#'
##“描述
#“@description计算通量足迹曲线和阈值曲线相交的位置。
#'
##“用法
#“\dontrun{
#'查找间隔(乐趣重量=影响KM01[x,],位置=步距[-1],阈值=距离)
#'  }
#'  
##"论据,
#“@param fun_足迹曲线距离的权重列表
#“@param距离塔的位置列表[m]
#“@塔测量源区域所有活动影响的参数阈值[%]
#' 
##“细节
#' 
#'
##"价值",
#'
#'
##”“注意
#'
##“另见
#'
#'
#'
#'
##"举例,
#
#'

find_inters错误是因为文件名带有数字而不是字母。这个我相信@rawr的评论是正确的:您使用的是格式错误的Roxygen语法,这是问题的根本原因。

您应该遵循Roxygen描述、vignettes、其他软件包中的格式和示例来解决问题。我没有读到任何关于名字不能以数字开头的文章,但很高兴知道。非常感谢。