Closed RFlazcano closed 3 years ago
@RFlazcano what is your sessionInfo()
?
This is my sessionInfo():
sessionInfo(package = NULL) R version 4.0.2 (2020-06-22) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rmarkdown_2.7 EML_2.0.5 LakeMetabolizer_1.5.0
[4] lubridate_1.7.10 rLakeAnalyzer_1.11.4.1 tidyr_1.1.2
[7] dplyr_1.0.0 readr_1.4.0
loaded via a namespace (and not attached):
[1] jsonld_2.2 Rcpp_1.0.5 emld_0.5.1 prettyunits_1.1.1
[5] ps_1.3.3 assertthat_0.2.1 rprojroot_1.3-2 digest_0.6.25
[9] utf8_1.1.4 V8_3.4.0 R6_2.4.1 plyr_1.8.6
[13] backports_1.1.7 evaluate_0.14 ggplot2_3.3.2 pillar_1.4.4
[17] rlang_0.4.6 lazyeval_0.2.2 curl_4.3 uuid_0.1-4
[21] rstudioapi_0.11 callr_3.5.1 desc_1.2.0 jqr_1.2.0
[25] munsell_0.5.0 tinytex_0.29 compiler_4.0.2 xfun_0.21
[29] pkgconfig_2.0.3 pkgbuild_1.2.0 htmltools_0.5.1.1 tidyselect_1.1.0
[33] tibble_3.0.1 fansi_0.4.1 crayon_1.3.4 withr_2.4.1
[37] grid_4.0.2 jsonlite_1.7.1 gtable_0.3.0 lifecycle_0.2.0
[41] magrittr_1.5 scales_1.1.1 cli_2.0.2 fs_1.5.0
[45] remotes_2.2.0 testthat_2.3.2 xml2_1.3.2 ellipsis_0.3.1
[49] generics_0.0.2 vctrs_0.3.1 tools_4.0.2 glue_1.4.1
[53] purrr_0.3.4 hms_0.5.3 processx_3.4.5 pkgload_1.1.0
[57] yaml_2.2.1 colorspace_1.4-1 sessioninfo_1.1.1 memoise_1.1.0
[61] knitr_1.30
Thanks @RFlazcano. Looks like there are two issues here:
set_TextType()
can't find "SparklingAbstract_NEP.docx". Try running the function with a full path to the file.as()
constructor doesn't work with EML versions > 2.0.0. Try abstract <- set_TextType(file)
. See the "Creating EML" vignette for a crash course in the new methods. Where is this "example" you are working from? Sounds like it needs an update.
Thank you! yes, it's from 2016, my PI got it from a colleague that went to a GLEON workshop.
createMetadata.pdf
@RFlazcano Ah yes ... that's the same document my supervisor (cgries) shared with me as an introduction to creating EML with R. If this document is publicly posted somewhere I recommend sending a request to deprecate it since the methods no longer work. It could be updated, but the vignette I posted above is probably enough.
For what purposes are you creating EML via R? If it's a time series dataset to be published at regular intervals, then you're on the right path. A programmatic approach like this simplifies EML versioning and supports automation. If you're new to EML, you might check out the EMLassemblyline R package, which is a rapper around EML R, abstracts away complexity of the schema, and inherits best practices from the US LTER information management community. On the other hand, if this is just a one-off data publication, EDI has a simple web-based editor (ezEML) you may want to consider. Under a user account, you can create and manage multiple EML documents, and publish these along with your data to a repository other than EDI if you wish.
I have just been going through those tutorials to later apply the methods to data we will be collecting later on this year. It will be time-series data for gas flux in a lake.
Thank you, this is really helpful as I learn my way around the package.
I am working on trying to create an EML file using the EML package but I am receiving an error when I run the example code: Has anyone found a way around this issue?
library(EML) library(markdown) title <- "Sparkling Lake, Wisconsin, daily metabolism calculations 2014" pubDate <- "2016" abstract <- as(set_TextType("SparklingAbstract_NEP.docx"), "abstract")
error: pandoc.exe: SparklingAbstract_NEP.docx: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1