Roxygen错误“跳过无效路径" [英] Roxygen error "Skipping invalid path"

查看:186
本文介绍了Roxygen错误“跳过无效路径"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行devtools :: document()的输出.我不知道如何解决这个问题,并且roxygen文档不能很好地帮助找出错误消息.关于如何摆脱这一点的任何想法,以便可以记录我的功能?

The output from running devtools::document(). I have no idea how to fix this and the roxygen documentation is not great at helping figure error messages out. Any ideas on how to get rid of this so my functions can be documented?

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 

这是我要记录的功能之一的示例.我意识到它的文档尚未完全记录,但我正在尝试使我可以继续更新的基本软件包正常工作.

Here is an example of one of the functions I am trying to document. I realize its not fully documented, but I am trying to get a basic package working that I can continue to update.

##'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)

}

推荐答案

错误是因为您使用的文件名带有数字而不是字母. 产生消息的相关代码在这里.我相信@rawr的评论是正确的:您使用格式错误的Roxygen语法,这是导致此问题的最终原因.

The error is because you have filenames that being with a number rather than a letter. The relevant code is here that produces the message is here. And I believe @rawr's comment is correct: you're using malformatted Roxygen syntax, which is the ultimate cause of the problem.

这篇关于Roxygen错误“跳过无效路径"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆