diff --git a/vignettes/pxd_example.rda b/vignettes/pxd_example.rda index e4616df1..a59342be 100644 Binary files a/vignettes/pxd_example.rda and b/vignettes/pxd_example.rda differ diff --git a/vignettes/pxfp_example.rda b/vignettes/pxfp_example.rda index f394d514..7f1028b3 100644 Binary files a/vignettes/pxfp_example.rda and b/vignettes/pxfp_example.rda differ diff --git a/vignettes/pxweb.Rmd b/vignettes/pxweb.Rmd index ceb14683..f8e98cc8 100644 --- a/vignettes/pxweb.Rmd +++ b/vignettes/pxweb.Rmd @@ -56,6 +56,8 @@ pxfp <- pxweb_get( ) save(pxfp, file = "vignettes/pxfp_example.rda") +pxweb_cite_example <- capture.output(pxweb_cite(pxd)) + ``` @@ -379,10 +381,15 @@ as.data.frame(pxdc) Finally, if we use the data, we can easily create a citation for a `pxweb_data` object using the `pxweb_cite()` function. For full reproducibility, please also cite the package. -```{r, message=FALSE, eval=TRUE} +```{r, message=FALSE, eval=FALSE} pxweb_cite(pxd) ``` +```{r, message=FALSE, eval=TRUE, echo=FALSE} +load("pxweb_cite_example.rda") +cat(pxweb_cite_example, sep = "\n") +``` + ## Known issues and troubleshooting diff --git a/vignettes/pxweb.html b/vignettes/pxweb.html index 79ab7849..3b1438f5 100644 --- a/vignettes/pxweb.html +++ b/vignettes/pxweb.html @@ -824,7 +824,7 @@

Downloading data

pxq ) pxfp -
## [1] "/var/folders/x9/dsgck_4s5mx2nrzzs8zd64rc0000gq/T//RtmpFdmiD7/34f86608f98d03b3cca3f1771a5081c3d3846465.px"
+
## [1] "/var/folders/x9/dsgck_4s5mx2nrzzs8zd64rc0000gq/T//RtmpFdmiD7/50026bd2b2d8df2e3f190ca568b3b587d8207465.px"

If the queries are large (contain more values than the PXWEB API maximum allowed values), the query is chunked into optimal chunks and is then downloaded sequentially. PXWEB data objects are then combined into @@ -894,8 +894,8 @@

Citation

pxweb_data object using the pxweb_cite() function. For full reproducibility, please also cite the package.

pxweb_cite(pxd)
-
## Statistics Sweden (2024). "Population by region, marital status, age,
-## sex, observations and year." [Data accessed 2024-01-27 16:08:12.926294
+
## Statistics Sweden (2024). “Population by region, marital status, age,
+## sex, observations and year.” [Data accessed 2024-01-27 16:19:42.712139
 ## using pxweb R package 0.16.3],
 ## <https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy>.
 ## 
@@ -908,7 +908,7 @@ 

Citation

## address = {Stockholm, Sweden}, ## year = {2024}, ## url = {https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy}, -## note = {[Data accessed 2024-01-27 16:08:12.926294 using pxweb R package 0.16.3]}, +## note = {[Data accessed 2024-01-27 16:19:42.712139 using pxweb R package 0.16.3]}, ## } ## Kindly cite the pxweb R package as follows: ## diff --git a/vignettes/pxweb_cite_example.rda b/vignettes/pxweb_cite_example.rda new file mode 100644 index 00000000..38acff19 Binary files /dev/null and b/vignettes/pxweb_cite_example.rda differ