我正试图从bib文件中获取特定标签的值.每当我尝试和我们entry["bibtype"]
或entry[["bibtype"]]
我得到一个错误,但entry$bibtype
工作正常.
entry<-bibentry(
bibtype = "Manual",
title = "R: A Language and Environment for Statistical Computing",
author = person("R Development Core Team"),
organization = "R Foundation for Statistical Computing",
address = "Vienna, Austria",
year = 2010,
isbn = "3-900051-07-0",
url = "http://www.R-project.org/")
# the first two fail
entry["bibtype"]
entry[["bibtype"]]
entry$bibtype
foo <- list("bar" = "baz")
#all of these work
foo["bar"]
foo[["bar"]]
foo$bar
Run Code Online (Sandbox Code Playgroud)
我得到的错误是:
Error in switch(attr(paper, "bibtype"), Article = formatArticle(paper), :
EXPR must be a …
Run Code Online (Sandbox Code Playgroud) r ×1