xml2 icon indicating copy to clipboard operation
xml2 copied to clipboard

read_xml ignores relative paths

Open Andreas-Bio opened this issue 1 year ago • 1 comments

read_xml ignores relative paths

#fails:
read_xml(x =  "./temp/rbcl_from_0_raw.xml" )
Error: './temp/rbcl_from_0_raw.xml' does not exist in current working directory ('D:/R/ACG').

#works:
read_xml(x = paste0( getwd(), "/temp/rbcl_from_0_raw.xml") )


rbcl_from_0_raw.zip

sessionInfo() R version 4.2.1 (2022-06-23 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets methods base

other attached packages: [1] xml2_1.3.3 rentrez_1.2.3 httr_1.4.3 taxize_0.9.100
[5] ShortRead_1.55.0 GenomicAlignments_1.33.0 SummarizedExperiment_1.27.1 Biobase_2.57.1
[9] MatrixGenerics_1.9.1 matrixStats_0.62.0 Rsamtools_2.13.3 GenomicRanges_1.49.0
[13] BiocParallel_1.31.8 Biostrings_2.65.1 GenomeInfoDb_1.33.3 XVector_0.37.0
[17] IRanges_2.31.0 S4Vectors_0.35.1 BiocGenerics_0.43.0 rgbif_3.7.2
[21] foreach_1.5.2 magrittr_2.0.3 data.table_1.14.2

loaded via a namespace (and not attached): [1] tidyr_1.2.0 bit64_4.0.5 jsonlite_1.8.0 bold_1.2.0
[5] assertthat_0.2.1 latticeExtra_0.6-29 blob_1.2.3 GenomeInfoDbData_1.2.8 [9] pillar_1.7.0 RSQLite_2.2.14 lattice_0.20-45 glue_1.6.2
[13] uuid_1.1-0 digest_0.6.29 RColorBrewer_1.1-3 colorspace_2.0-3
[17] Matrix_1.4-1 plyr_1.8.7 XML_3.99-0.10 pkgconfig_2.0.3
[21] oai_0.3.2 httpcode_0.3.0 zlibbioc_1.43.0 purrr_0.3.4
[25] scales_1.2.0 whisker_0.4 jpeg_0.1-9 tibble_3.1.7
[29] generics_0.1.2 ggplot2_3.3.6 ellipsis_0.3.2 cachem_1.0.6
[33] lazyeval_0.2.2 cli_3.3.0 crayon_1.5.1 memoise_2.0.1
[37] fansi_1.0.3 nlme_3.1-157 hwriter_1.3.2.1 tools_4.2.1
[41] lifecycle_1.0.1 stringr_1.4.0 munsell_0.5.0 DelayedArray_0.23.0
[45] compiler_4.2.1 rlang_1.0.3 taxizedb_0.3.0 grid_4.2.1
[49] conditionz_0.1.0 RCurl_1.98-1.7 iterators_1.0.14 rstudioapi_0.13
[53] rappdirs_0.3.3 bitops_1.0-7 gtable_0.3.0 codetools_0.2-18
[57] reshape_0.8.9 DBI_1.1.3 curl_4.3.2 R6_2.5.1
[61] zoo_1.8-10 dplyr_1.0.9 fastmap_1.1.0 bit_4.0.4
[65] utf8_1.2.2 ape_5.6-2 hoardr_0.5.2 stringi_1.7.6
[69] crul_1.2.0 Rcpp_1.0.8.3 vctrs_0.4.1 png_0.1-7
[73] dbplyr_2.2.1 tidyselect_1.1.2

Andreas-Bio avatar Jul 05 '22 13:07 Andreas-Bio

That was a weird one. Found the problem. If the USB stick disconnects because it's a bit wobbly, it doesn't work any more. If I restart RStudio it works until the stick disconnects itself again.

Maybe some hardware ID change in the background or something?

This applies to all R libraries, so I guess this can be closed.

Andreas-Bio avatar Jul 05 '22 16:07 Andreas-Bio