作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在 R-devel(当时 >3.6.1)上,运行 R CMD Check 时,我的包中弹出一个新警告,如下所示:
“Variables with usage in documentation object ‘FANG’ but not in code:”
'FANG'
最佳答案
这是 R-devel 中引入的一项新检查:
https://github.com/wch/r-source/commit/c9adb21c2e37cbc6dccd4c1eceec1873c10e3d9e#diff-4882a8c8e173bda109ed98da485e1428
虽然错误消息令人困惑,但对我来说解决方法是设置 LazyData: true
在我的描述文件中。
问题是在我的 data.R
中文件,我使用 roxygen2 生成 Rd 文件。 data.R
文件看起来像:
#' Stock prices for Facebook, Amazon, Netflix and Google from 2013-2016
#'
#' A dataset containing the date, open, high, low, close, volume, and adjusted
#' stock prices for Facebook, Amazon, Netflix and Google from 2013-2016.
#'
#' @format A tibble with 4,032 rows and 8 variables:
#' \describe{
#' \item{symbol}{stock ticker symbol}
#' \item{date}{trade date}
#' \item{open}{stock price at the open of trading, in USD}
#' \item{high}{stock price at the highest point during trading, in USD}
#' \item{low}{stock price at the lowest point during trading, in USD}
#' \item{close}{stock price at the close of trading, in USD}
#' \item{volume}{number of shares traded}
#' \item{adjusted}{stock price at the close of trading adjusted for stock splits, in USD}
#' }
#' @source \url{http://www.investopedia.com/terms/f/fang-stocks-fb-amzn.asp}
"FANG"
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{FANG}
\alias{FANG}
\title{Stock prices for Facebook, Amazon, Netflix and Google from 2013-2016}
\format{A tibble with 4,032 rows and 8 variables:
\describe{
\item{symbol}{stock ticker symbol}
\item{date}{trade date}
\item{open}{stock price at the open of trading, in USD}
\item{high}{stock price at the highest point during trading, in USD}
\item{low}{stock price at the lowest point during trading, in USD}
\item{close}{stock price at the close of trading, in USD}
\item{volume}{number of shares traded}
\item{adjusted}{stock price at the close of trading adjusted for stock splits, in USD}
}}
\source{
\url{http://www.investopedia.com/terms/f/fang-stocks-fb-amzn.asp}
}
\usage{
FANG
}
\description{
A dataset containing the date, open, high, low, close, volume, and adjusted
stock prices for Facebook, Amazon, Netflix and Google from 2013-2016.
}
\keyword{datasets}
\usage{}
部分。我有
LazyData: false
隐含地,这意味着
\usage{FANG}
不正确,应该是
\usage{data(FANG)}
.我的
data.R
中没有什么可以改变的文件来生成这个,因为 roxygen2 基本上假设你有
LazyData: true
当它生成数据 Rd 文件时。
关于r - 警告 : “Variables with usage in documentation object ‘FANG’ but not in code:”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57396392/
我一直在关注this paper (特别是有关 Fang 方法的部分),试图使用 TDOA technique 来解决三边测量问题。 。 我希望有Fang/TDOA经验的人可以向我伸出援助之手。由于某
在 R-devel(当时 >3.6.1)上,运行 R CMD Check 时,我的包中弹出一个新警告,如下所示: “Variables with usage in documentation obje
我是一名优秀的程序员,十分优秀!