Windows \Rd中的链接[grDevices]{win.metafile}:如何通过UNIX环境中的R CMD检查警告?

Windows \Rd中的链接[grDevices]{win.metafile}:如何通过UNIX环境中的R CMD检查警告?,windows,r,unix,roxygen2,rd,Windows,R,Unix,Roxygen2,Rd,我在UNIX环境中工作,正在制作一个程序包,其中实用程序函数的Rd需要链接到grDevices::win.metafile帮助页面(特定于Windows)。我的.R文件(使用roxygen2)是 我看过编写R扩展的交叉引用,但唯一的替代方法似乎是[grDevices:win.metafile]{win.metafile},它给出了相同的结果(老实说,我不完全理解它的含义) 有什么要“闭嘴”的提示吗?谢谢,卢卡,这不是一张便条吗?如果您使用的是unix,则不会有该功能或设备。不过我觉得你不能让他们

我在UNIX环境中工作,正在制作一个程序包,其中实用程序函数的
Rd
需要链接到
grDevices::win.metafile
帮助页面(特定于Windows)。我的
.R
文件(使用
roxygen2
)是

我看过编写R扩展的交叉引用,但唯一的替代方法似乎是
[grDevices:win.metafile]{win.metafile}
,它给出了相同的结果(老实说,我不完全理解它的含义)


有什么要“闭嘴”的提示吗?谢谢,卢卡,这不是一张便条吗?如果您使用的是unix,则不会有该功能或设备。不过我觉得你不能让他们闭嘴。我在内部参考时也会得到同样的东西packages@rawr不,这是一个警告。谢谢…这应该是一个警告。不幸的是,只要您错过正在引用的Rd文件,就会收到警告。您可以通过手动复制文件来欺骗检查器。
#' Open a vectorial device file in a portable way.                              
#'                                                                              
#'                                                                              
#' Portable function which choose what (vectorial) device to open looking at    
#' the system.                                                                  
#'                                                                              
#'                                                                              
#' @usage graph(file, width, height, ...)                                       
#' @param file path without extension                                           
#' @param width width in inches                                                 
#' @param height height in inches                                               
#' @param ... other arguments passed to \code{\link{pdf}} or                    
#' \code{\link[grDevices]{win.metafile}}                                        
#' @return Values returned by pdf or win.metafile?                              
#' @keywords pdf win.metafile vectorial graph                                   
#' @export graph                                                                
graph <- function(file="", width = 7,
                  height = 7,  ...) {

    if (Sys.info()["sysname"]=="Linux") {
        path <- paste(file, "pdf" ,sep=".")
        pdf(file=path, width = width, height = height, ...)
    } else if (Sys.info()["sysname"]=="Windows") {
        path <- paste(file, "emf" ,sep=".")
        win.metafile(filename=path, width = width, height = height, ...)
    }
}
Missing link or links in documentation object 'graph.Rd':
  ‘[grDevices]{win.metafile}’
See the information in section 'Cross-references' of the 'Writing R
Extensions' manual.