diff --git a/index.html b/index.html index 927e4da..bc71cfa 100644 --- a/index.html +++ b/index.html @@ -51,8 +51,8 @@ -
The goal of pkgdoc is to make it easy to create a data frame of the documentation of multiple packages.
-If you develop a universe, such as the tidyverse or tidymodels, pkgdoc helps you to easily create a universe-wide reference for the pkgdown website of your meta-package (example).
+The goal of pkgdoc is to make it easy to create a data frame of the metadata associated to the documentation of a collection of R packages.
+If you maintain an R-package universe, it helps you to easily create a universe-wide reference for the pkgdown website of your meta-package (e.g. tidyverse, tidymodels).
library(pkgdoc)
-library(fgeo.x)
-library(fgeo.plot)
-universe <- c("fgeo.plot", "fgeo.x")
+library(tools)
+library(datasets)
+universe <- c("tools", "datasets")
-docs <- reference_package(universe, url = "https://forestgeo.github.io/")
-docs
-#> # A tibble: 32 × 5
-#> topic alias title concept package
-#> <glue> <chr> <chr> <chr> <glue>
-#> 1 <a href=https://forestgeo.github.io/fgeo.plot/re… auto… Plot… autopl… <a hre…
-#> 2 <a href=https://forestgeo.github.io/fgeo.plot/re… auto… Plot… plot f… <a hre…
-#> 3 <a href=https://forestgeo.github.io/fgeo.plot/re… auto… Plot… autopl… <a hre…
-#> 4 <a href=https://forestgeo.github.io/fgeo.plot/re… auto… Plot… functi… <a hre…
-#> 5 <a href=https://forestgeo.github.io/fgeo.plot/re… auto… Plot… functi… <a hre…
-#> 6 <a href=https://forestgeo.github.io/fgeo.plot/re… auto… Plot… plot f… <a hre…
-#> 7 <a href=https://forestgeo.github.io/fgeo.plot/re… auto… List… functi… <a hre…
-#> 8 <a href=https://forestgeo.github.io/fgeo.plot/re… auto… List… functi… <a hre…
-#> 9 <a href=https://forestgeo.github.io/fgeo.plot/re… auto… List… functi… <a hre…
-#> 10 <a href=https://forestgeo.github.io/fgeo.plot/re… auto… List… plot f… <a hre…
-#> # ℹ 22 more rows
You can easily organize the documentation by concept (#' @family
) and make links clickable with DT::datatable()
or knitr::kable()
. For example:
You may organize the documentation by package or concept (#' @family
):
# By package
+subset(docs, package == "datasets")
+#> # A tibble: 87 × 5
+#> topic alias title concept package
+#> <chr> <chr> <chr> <chr> <chr>
+#> 1 AirPassengers AirPassengers Monthly Airline Passeng… Datase… datase…
+#> 2 BJsales BJsales, BJsales.lead Sales Data with Leading… Datase… datase…
+#> 3 BOD BOD Biochemical Oxygen Dema… Datase… datase…
+#> 4 CO2 CO2 Carbon Dioxide Uptake i… Datase… datase…
+#> 5 ChickWeight ChickWeight Weight versus age of ch… Datase… datase…
+#> 6 DNase DNase Elisa assay of DNase Datase… datase…
+#> 7 EuStockMarkets EuStockMarkets Daily Closing Prices of… Datase… datase…
+#> 8 Formaldehyde Formaldehyde Determination of Formal… Datase… datase…
+#> 9 HairEyeColor HairEyeColor Hair and Eye Color of S… Datase… datase…
+#> 10 Harman23.cor Harman23.cor Harman Example 2.3 Datase… datase…
+#> # ℹ 77 more rows
+
+subset(docs, package == "tools")
+#> # A tibble: 141 × 5
+#> topic alias title concept package
+#> <chr> <chr> <chr> <chr> <chr>
+#> 1 .print.via.format .print.via.format Prin… Utilit… tools
+#> 2 Adobe_glyphs Adobe_glyphs, charset_to_Unicode Conv… Datase… tools
+#> 3 CRAN_package_db CRAN_package_db, CRAN_check_results,… CRAN… <NA> tools
+#> 4 HTMLheader HTMLheader Gene… Utilit… tools
+#> 5 HTMLheader HTMLheader Gene… Docume… tools
+#> 6 HTMLheader HTMLheader Gene… Utilit… tools
+#> 7 HTMLheader HTMLheader Gene… Docume… tools
+#> 8 QC QC, checkDocFiles, checkDocStyle, ch… QC C… Utilit… tools
+#> 9 QC QC, checkDocFiles, checkDocStyle, ch… QC C… Docume… tools
+#> 10 QC QC, checkDocFiles, checkDocStyle, ch… QC C… Utilit… tools
+#> # ℹ 131 more rows
+
+# By concept
+datasets <- subset(docs, concept == "Datasets available by data()")
+datasets
+#> # A tibble: 87 × 5
+#> topic alias title concept package
+#> <chr> <chr> <chr> <chr> <chr>
+#> 1 Adobe_glyphs Adobe_glyphs, charset_to_Unicode Conversion T… Datase… tools
+#> 2 AirPassengers AirPassengers Monthly Airl… Datase… datase…
+#> 3 BJsales BJsales, BJsales.lead Sales Data w… Datase… datase…
+#> 4 BOD BOD Biochemical … Datase… datase…
+#> 5 CO2 CO2 Carbon Dioxi… Datase… datase…
+#> 6 ChickWeight ChickWeight Weight versu… Datase… datase…
+#> 7 DNase DNase Elisa assay … Datase… datase…
+#> 8 EuStockMarkets EuStockMarkets Daily Closin… Datase… datase…
+#> 9 Formaldehyde Formaldehyde Determinatio… Datase… datase…
+#> 10 HairEyeColor HairEyeColor Hair and Eye… Datase… datase…
+#> # ℹ 77 more rows
+
+utilities <- subset(docs, concept == "utilities")
+utilities
+#> # A tibble: 0 × 5
+#> # ℹ 5 variables: topic <chr>, alias <chr>, title <chr>, concept <chr>,
+#> # package <chr>
+You may link to documentation online.
+
+template <- "<a href=https://www.rdocumentation.org/packages/%s/versions/3.6.2/topics/%s>?</a>"
+linked <- transform(datasets, topic = sprintf(template, package, topic))
+knitr::kable(head(linked))
topic | -alias | -title | -concept | -package | -|||||
---|---|---|---|---|---|---|---|---|---|
? | -autoplot | -Plot habitats. | -autoplots | -fgeo.plot | |||||
? | -autoplot | -Plot species distribution and/or topography. | -autoplots | -fgeo.plot | +? | +BOD | +Biochemical Oxygen Demand | +Datasets available by data() | +datasets |
? | -elev | -Allow autoplotting the column ‘elev’. | -autoplots | -fgeo.plot | +? | +CO2 | +Carbon Dioxide Uptake in Grass Plants | +Datasets available by data() | +datasets |
? | -sp | -Allow autoplotting the column ‘sp’. | -autoplots | -fgeo.plot | -|||||
? | -sp_elev | -Allow autoplotting the columns ‘sp’ and ‘elev’. | -autoplots | -fgeo.plot | +? | +ChickWeight | +Weight versus age of chicks on different diets | +Datasets available by data() | +datasets |
search_docs(NULL)
-#> # A tibble: 39,339 × 11
+#> # A tibble: 39,338 × 11
#> package libpath id name title topic encoding type alias keyword concept
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 R6 /home/… 1/1 R6Cl… Crea… R6Cl… UTF-8 help R6Cl… NA NA
@@ -80,7 +80,7 @@ Examples#> 8 RColorB… /home/… 2/1 RCol… Colo… RCol… UTF-8 help disp… color Color,…
#> 9 RColorB… /home/… 2/1 RCol… Colo… RCol… UTF-8 help brew… color Color,…
#> 10 RColorB… /home/… 2/1 RCol… Colo… RCol… UTF-8 help brew… color Color,…
-#> # ℹ 39,329 more rows
+#> # ℹ 39,328 more rows