0
我想修改citation
對象R
如下修改`citation`對象`R`
cit <- citation("ggplot2")
cit$textVersion
#[1] "H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2009."
cit$textVersion <- "Hadley Wickham and Winston Chang (2016). ggplot2: Create Elegant Data Visualisations Using
the Grammar of Graphics. R package version 2.2.1."
但沒有改變。
cit$textVersion
#[1] "H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2009."
如果我們檢查的cit
結構,現在有兩個textVersion
屬性。如何修改原來的textVersion
?
str(cit)
List of 1
$ :Class 'bibentry' hidden list of 1
..$ :List of 6
.. ..$ author :Class 'person' hidden list of 1
.. .. ..$ :List of 5
.. .. .. ..$ given : chr "Hadley"
.. .. .. ..$ family : chr "Wickham"
.. .. .. ..$ role : NULL
.. .. .. ..$ email : NULL
.. .. .. ..$ comment: NULL
.. ..$ title : chr "ggplot2: Elegant Graphics for Data Analysis"
.. ..$ publisher: chr "Springer-Verlag New York"
.. ..$ year : chr "2009"
.. ..$ isbn : chr "978-0-387-98140-6"
.. ..$ url : chr "http://ggplot2.org"
.. ..- attr(*, "bibtype")= chr "Book"
.. ..- attr(*, "textVersion")= chr "H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2009."
.. ..- attr(*, "textversion")= chr "Hadley Wickham and Winston Chang (2016). ggplot2: Create Elegant Data Visualisations Using\n the Grammar of Gr"| __truncated__
- attr(*, "mheader")= chr "To cite ggplot2 in publications, please use:"
- attr(*, "class")= chr "bibentry"