2

私はUNIX環境で作業しており、ユーティリティ機能がヘルプページRdにリンクする必要があるパッケージを作成していgrDevices::win.metafileます(これはWindows固有です)。私の.Rファイル(を使用roxygen2)は

#' 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, ...)
    }
}

ただし、 に移動するR CMD checkと、警告が発行されます。

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.

Cross-references of Writing R Extensionsを見てきましたが、唯一の代替方法[grDevices:win.metafile]{win.metafile}は、同じ結果が得られるようです (正直言って、その意味を完全には理解していませんでした)。

チェックを「黙らせる」ためのヒントはありますか?ありがとう、ルカ

4

0 に答える 0