Git Product home page Git Product logo

kwb.pubs's Introduction

kwb.pubs's People

Contributors

hsonne avatar mrustl avatar

Watchers

 avatar  avatar  avatar  avatar

kwb.pubs's Issues

feat: import "authors" from Endnote DB (sdb.ini)

Similar to the data processing function used for cleaning editors (#5) (secondary_author) we need one function for preparing the author column in sdb.ini. Problem is that the names are mostly in lastname, firstname format (short or complete firstname) but sometimes may be also in firstname lastname format.

This function is crucial in order to reduce the dependency hell (#7) and also simplify the .md creation for publications (i.e. all values are filled by one function call!!)

bug: replace_publications_in_pub_index_md() behavior changed after cleaning

Cleaning (#6) unfortunately introduced a bug. The function replace_publications_in_pub_index_md() now produces wrong results (content is linked to wrong rec_id and formatting is also not correct, see screenshot for rec_id=1045):
grafik

remotes::install_github("kwb-r/kwb.pubs@4ce47443f1812a96e033d5a927a4b307d2d5617b", upgrade = "always")
kwb.pubs::replace_publications_in_pub_index_md(md_paths = pub_md_paths, 
                                               endnote_db_refs = en_refs)

Data for bug-fixing:

Please fix and verify that publication stays the same for all records!

encoding issue on KWB pc

Using d5bf505 the following fails on my computer at KWB:

authors_config <- kwb.pubs::get_authors_config()
authors_metadata <- kwb.pubs::add_authors_metadata(authors_config)
Fehler in stri_trim_both(string) : 
  invalid UTF-8 byte sequence detected; try calling stri_enc_toutf8()

### does not work as expected
kwb.pubs:::replace_umlauts(string = authors_config$lastname)
 [1] "caradot"       "conzelmann"    "evel"          "gnirß"         "günsch"        "habibi"        "jährig"        "kleyböcker"   
 [9] "knoche"        "kraus"         "matzinger"     "miehe"         "remy"          "riechel"       "rouault"       "roßbach"      
[17] "rose"          "rustler"       "schubert"      "schütz"        "schwarzmüller" "seis"          "sprenger"      "sonnenberg"   
[25] "stapf"         "tatis muvdi"   "toutian"       "weigert"       "wicke"         "zamzow"        "zhou"  

 sessioninfo::session_info()
- Session info -------------------------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 4.0.1 (2020-06-06)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  German_Germany.1252         
 ctype    German_Germany.1252         
 tz       Europe/Berlin               
 date     2020-07-08                  

- Packages -----------------------------------------------------------------------------------------------------------------------------------
 package      * version    date       lib source                            
 assertthat     0.2.1      2019-03-21 [1] CRAN (R 4.0.0)                    
 bib2df         1.1.1      2019-05-22 [1] CRAN (R 4.0.0)                    
 bit            1.1-15.2   2020-02-10 [1] CRAN (R 4.0.0)                    
 bit64          0.9-7      2017-05-08 [1] CRAN (R 4.0.0)                    
 blob           1.2.1      2020-01-20 [1] CRAN (R 4.0.2)                    
 blogdown       0.19.2     2020-06-23 [1] Github (rstudio/blogdown@f1e08d0) 
 cli            2.0.2      2020-02-28 [1] CRAN (R 4.0.0)                    
 colorspace     1.4-1      2019-03-18 [1] CRAN (R 4.0.0)                    
 crayon         1.3.4      2017-09-16 [1] CRAN (R 4.0.0)                    
 DBI            1.1.0      2019-12-15 [1] CRAN (R 4.0.2)                    
 digest         0.6.25     2020-02-23 [1] CRAN (R 4.0.0)                    
 dplyr        * 1.0.0      2020-05-29 [1] CRAN (R 4.0.0)                    
 ellipsis       0.3.1      2020-05-15 [1] CRAN (R 4.0.0)                    
 fansi          0.4.1      2020-01-08 [1] CRAN (R 4.0.0)                    
 forcats        0.5.0      2020-03-01 [1] CRAN (R 4.0.0)                    
 fs             1.4.1      2020-04-04 [1] CRAN (R 4.0.0)                    
 generics       0.0.2      2018-11-29 [1] CRAN (R 4.0.0)                    
 ggplot2        3.3.2      2020-06-19 [1] CRAN (R 4.0.2)                    
 glue           1.4.1      2020-05-13 [1] CRAN (R 4.0.0)                    
 gtable         0.3.0      2019-03-25 [1] CRAN (R 4.0.0)                    
 hms            0.5.3      2020-01-08 [1] CRAN (R 4.0.0)                    
 htmltools      0.5.0      2020-06-16 [1] CRAN (R 4.0.0)                    
 htmlwidgets    1.5.1      2019-10-08 [1] CRAN (R 4.0.0)                    
 httr           1.4.1      2019-08-05 [1] CRAN (R 4.0.0)                    
 humaniformat   0.6.0      2016-04-24 [1] CRAN (R 4.0.0)                    
 jsonlite       1.6.1      2020-02-02 [1] CRAN (R 4.0.0)                    
 kwb.endnote    0.1.0      2020-06-23 [1] Github (kwb-r/kwb.endnote@76ee94d)
 kwb.fakin      0.4.1      2020-06-23 [1] Github (kwb-r/kwb.fakin@7cc1dc0)  
 kwb.file       0.3.1      2020-06-23 [1] Github (kwb-r/kwb.file@de2ba90)   
 kwb.pubs     * 0.1.0      2020-06-23 [1] Github (kwb-r/kwb.pubs@d5bf505)   
 kwb.read       0.0.0.9000 2020-06-23 [1] Github (kwb-r/kwb.read@5ae74e3)   
 kwb.utils      0.6.0      2020-06-17 [1] Github (kwb-r/kwb.utils@fe0a495)  
 lattice        0.20-41    2020-04-02 [2] CRAN (R 4.0.1)                    
 lifecycle      0.2.0      2020-03-06 [1] CRAN (R 4.0.0)                    
 lubridate      1.7.9      2020-06-08 [1] CRAN (R 4.0.0)                    
 magick         2.3        2020-01-24 [1] CRAN (R 4.0.0)                    
 magrittr       1.5        2014-11-22 [1] CRAN (R 4.0.0)                    
 Matrix         1.2-18     2019-11-27 [2] CRAN (R 4.0.1)                    
 memoise        1.1.0      2017-04-21 [1] CRAN (R 4.0.0)                    
 munsell        0.5.0      2018-06-12 [1] CRAN (R 4.0.0)                    
 openxlsx       4.1.5      2020-05-06 [1] CRAN (R 4.0.0)                    
 pillar         1.4.4      2020-05-05 [1] CRAN (R 4.0.0)                    
 pkgconfig      2.0.3      2019-09-22 [1] CRAN (R 4.0.0)                    
 purrr          0.3.4      2020-04-17 [1] CRAN (R 4.0.0)                    
 R6             2.4.1      2019-11-12 [1] CRAN (R 4.0.0)                    
 Rcpp           1.0.4.6    2020-04-09 [1] CRAN (R 4.0.0)                    
 readr          1.3.1      2018-12-21 [1] CRAN (R 4.0.0)                    
 remotes        2.1.1      2020-02-15 [1] CRAN (R 4.0.0)                    
 reticulate     1.16       2020-05-27 [1] CRAN (R 4.0.0)                    
 rlang          0.4.6      2020-05-02 [1] CRAN (R 4.0.0)                    
 RSQLite        2.2.0      2020-01-07 [1] CRAN (R 4.0.2)                    
 rstudioapi     0.11       2020-02-07 [1] CRAN (R 4.0.0)                    
 scales         1.1.1      2020-05-11 [1] CRAN (R 4.0.0)                    
 sessioninfo    1.1.1      2018-11-05 [1] CRAN (R 4.0.0)                    
 stringi        1.4.6      2020-02-17 [1] CRAN (R 4.0.0)                    
 stringr        1.4.0      2019-02-10 [1] CRAN (R 4.0.0)                    
 tibble         3.0.1      2020-04-20 [1] CRAN (R 4.0.0)                    
 tidyr          1.1.0      2020-05-20 [1] CRAN (R 4.0.0)                    
 tidyselect     1.1.0      2020-05-11 [1] CRAN (R 4.0.0)                    
 tinytex        0.24       2020-06-20 [1] CRAN (R 4.0.2)                    
 vctrs          0.3.1      2020-06-05 [1] CRAN (R 4.0.0)                    
 withr          2.2.0      2020-04-20 [1] CRAN (R 4.0.0)                    
 wordcloud2     0.2.1      2018-01-03 [1] CRAN (R 4.0.0)                    
 xfun           0.15       2020-06-21 [1] CRAN (R 4.0.2)                    
 xml2           1.3.2      2020-04-23 [1] CRAN (R 4.0.0)                    
 zip            2.0.4      2019-09-01 [1] CRAN (R 4.0.0)                    

[1] C:/Users/mrustl/Documents/R/win-library/4.0
[2] C:/Program Files/R/R-4.0.1/library

while the same works on my personal notebook:

authors_config <- kwb.pubs::get_authors_config()
authors_metadata <- kwb.pubs::add_authors_metadata(authors_config)
kwb.pubs:::replace_umlauts(string = authors_config$lastname)
 [1] "caradot"        "conzelmann"     "evel"           "gnirss"        
 [5] "guensch"        "habibi"         "jaehrig"        "kleyboecker"   
 [9] "knoche"         "kraus"          "matzinger"      "miehe"         
[13] "remy"           "riechel"        "rouault"        "rossbach"      
[17] "rose"           "rustler"        "schubert"       "schuetz"       
[21] "schwarzmueller" "seis"           "sprenger"       "sonnenberg"    
[25] "stapf"          "tatis muvdi"    "toutian"        "weigert"       
[29] "wicke"          "zamzow"         "zhou"          
sessioninfo::session_info()
- Session info ---------------------------------------------------------------------
 setting  value                       
 version  R version 4.0.0 (2020-04-24)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  German_Germany.1252         
 ctype    German_Germany.1252         
 tz       Europe/Berlin               
 date     2020-07-08                  

- Packages -------------------------------------------------------------------------
 package     * version date       lib source                           
 assertthat    0.2.1   2019-03-21 [1] CRAN (R 4.0.0)                   
 blogdown      0.19.2  2020-06-18 [1] Github (rstudio/blogdown@f1e08d0)
 cli           2.0.2   2020-02-28 [1] CRAN (R 4.0.0)                   
 crayon        1.3.4   2017-09-16 [1] CRAN (R 4.0.0)                   
 dplyr         1.0.0   2020-05-29 [1] CRAN (R 4.0.0)                   
 ellipsis      0.3.1   2020-05-15 [1] CRAN (R 4.0.0)                   
 fansi         0.4.1   2020-01-08 [1] CRAN (R 4.0.0)                   
 fs            1.4.2   2020-06-30 [1] CRAN (R 4.0.0)                   
 generics      0.0.2   2018-11-29 [1] CRAN (R 4.0.0)                   
 glue          1.4.1   2020-05-13 [1] CRAN (R 4.0.0)                   
 kwb.pubs      0.1.0   2020-06-18 [1] Github (kwb-r/kwb.pubs@d5bf505)  
 lifecycle     0.2.0   2020-03-06 [1] CRAN (R 4.0.0)                   
 magick        2.3     2020-01-24 [1] CRAN (R 4.0.0)                   
 magrittr      1.5     2014-11-22 [1] CRAN (R 4.0.0)                   
 packrat       0.5.0   2018-11-14 [1] CRAN (R 4.0.0)                   
 pillar        1.4.4   2020-05-05 [1] CRAN (R 4.0.0)                   
 pkgconfig     2.0.3   2019-09-22 [1] CRAN (R 4.0.0)                   
 purrr         0.3.4   2020-04-17 [1] CRAN (R 4.0.0)                   
 R6            2.4.1   2019-11-12 [1] CRAN (R 4.0.0)                   
 Rcpp          1.0.4.6 2020-04-09 [1] CRAN (R 4.0.0)                   
 rlang         0.4.6   2020-05-02 [1] CRAN (R 4.0.0)                   
 rstudioapi    0.11    2020-02-07 [1] CRAN (R 4.0.0)                   
 sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 4.0.0)                   
 stringi       1.4.6   2020-02-17 [1] CRAN (R 4.0.0)                   
 stringr       1.4.0   2019-02-10 [1] CRAN (R 4.0.0)                   
 tibble        3.0.1   2020-04-20 [1] CRAN (R 4.0.0)                   
 tidyr         1.1.0   2020-05-20 [1] CRAN (R 4.0.0)                   
 tidyselect    1.1.0   2020-05-11 [1] CRAN (R 4.0.0)                   
 vctrs         0.3.1   2020-06-05 [1] CRAN (R 4.0.0)                   
 withr         2.2.0   2020-04-20 [1] CRAN (R 4.0.0)                   
 xfun          0.15    2020-06-21 [1] CRAN (R 4.0.2)                   

[1] C:/Users/micha/Documents/R/win-library/4.0
[2] C:/Program Files/R/R-4.0.0/library

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.