R에 로드된 패키지 버전을 확인하는 방법
다음 기능을 사용하여 R에 로드된 패키지 버전을 확인할 수 있습니다.
#display package version packageVersion(" ggplot2 ") #display the date when this package version was released packageDate(" ggplot2 ") #display description of the package packageDescription(" ggplot2 ")
다음 예에서는 이러한 기능을 실제로 사용하는 방법을 보여줍니다.
예: R에 로드된 패키지 버전 확인
ggplot2 패키지를 현재 R 환경에 로드한다고 가정해 보겠습니다.
library (ggplot2)
packageVersion() 함수를 사용하여 로드된 ggplot2 버전을 확인할 수 있습니다.
#display package version packageVersion(" ggplot2 ") [1] '3.3.2'
버전 3.2.2 가 로드된 것을 볼 수 있습니다.
이 버전이 언제 출시되었는지 확인하려면 packageDate() 함수를 사용하면 됩니다.
#display the date when this package version was released packageDate(" ggplot2 ") [1] "2020-06-17"
이 버전은 2020년 6월 17일에 출시된 것을 확인할 수 있습니다.
그리고 패키지에 대한 설명을 표시하려면 packageDescription() 함수를 사용할 수 있습니다.
#display description of the package packageDescription(" ggplot2 ") Package: ggplot2 Version: 3.3.2 Title: Create Elegant Data Visualizations Using the Grammar of Graphics Description: A system for 'declaratively' creating graphics, based on "The Grammar of Graphics". You provide the data, tell 'ggplot2' how to map variables to aesthetics, what graphical primitives to use, and it takes care of the details. Authors@R: c( person("Hadley", "Wickham", , "hadley@rstudio.com", "aut", comment = c(ORCID = "0000-0003-4757-117X"), person("Winston", "Chang", , role = "aut", comment = c(ORCID = "0000-0002-1576-2126"), person("Lionel", "Henry", , role = "aut"), person("Thomas Lin", "Pedersen", , "thomas.pedersen@rstudio.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-5147-4711"), person("Kohske", "Takahashi", role = "aut"), person("Claus", "Wilke", role = "aut", comment = c(ORCID = "0000-0002-7470-9261"), person("Kara", "Woo", role = "aut", comment = c(ORCID = "0000-0002-5125-4188"), person("Hiroaki", "Yutani", role = "aut", comment = c(ORCID = "0000-0002-3385-7233"), person("Dewey", "Dunnington", role = "aut", comment = c(ORCID = "0000-0002-9415-4582"), person("RStudio", role = c("cph", "fnd"))) Depends: R (>= 3.2) Imports: digest, glue, grDevices, grid, gtable (>= 0.1.1), isoband, MASS, mgcv, rlang (>= 0.3.0), scales (>= 0.5.0), stats, tibble, withr (>= 2.0.0) Suggested: covr, dplyr, ggplot2movies, hexbin, Hmisc, knitr, lattice, mapproj, maps, maptools, multcomp, munsell, nlme, profvis, quantreg, RColorBrewer, rgeos, rmarkdown, rpart, sf (>= 0.7-3), svglite (>= 1.2.0.9001), testthat (>= 2.1.0), vdiffr (>= 0.3.0) Enhances:sp License: GPL-2 | LICENSE file URL: https://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2 BugReports: https://github.com/tidyverse/ggplot2/issues LazyData: true Collate: 'ggproto.r' 'ggplot-global.R' 'aaa-.r' 'aes-color-fill-alpha.r' ..... ThumbnailBuilder: knitr Roxygen Note: 7.1.0.9000 Encoding: UTF-8 NeedsCompilation: no Packaged: 2020-06-17 06:03:58 UTC; thomas Author: Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Winston Chang [aut] (<https://orcid.org/0000-0002-1576-2126>), Lionel Henry [aut], Thomas Lin Pedersen [aut, cre] (<https://orcid.org/0000-0002-5147-4711>), Kohske Takahashi [aut], Claus Wilke [aut] (<https://orcid.org/0000-0002-7470-9261>), Kara Woo [aut] (<https://orcid.org/0000-0002-5125-4188>), Hiroaki Yutani [aut] (<https://orcid.org/0000-0002-3385-7233>), Dewey Dunnington [aut] (<https://orcid.org/0000-0002-9415-4582>), RStudio [cph, fnd] Maintainer: Thomas Lin Pedersen <thomas.pedersen@rstudio.com> Repository: CRAN Date/Publication: 2020-06-19 13:00:03 UTC Built: R 4.0.3; ; 2020-11-20 18:07:33 UTC; unix -- File: /usr/lib/R/site-library/ggplot2/Meta/package.rds
설명에는 패키지가 수행하는 작업, 패키지를 만든 사람, 버그를 보고할 위치, 출시 시기 등에 대한 간략한 설명이 포함됩니다.
추가 리소스
다음 튜토리얼에서는 R에서 다른 일반적인 작업을 수행하는 방법을 설명합니다.