AntoineSoetewey / statsandr

A blog on statistics and R aiming at helping academics and professionals working with data to grasp important concepts in statistics and to apply them in R. See www.statsandr.com
http://statsandr.com/
35 stars 15 forks source link

blog/a-package-to-download-free-springer-books-during-covid-19-quarantine/ #31

Closed utterances-bot closed 3 years ago

utterances-bot commented 3 years ago

A package to download free Springer books during Covid-19 quarantine - Stats and R

This article presents a R package which allows to download free data science books in PDF that are made available by Springer during the COVID-19 quarantine

https://statsandr.com/blog/a-package-to-download-free-springer-books-during-covid-19-quarantine/

AntoineSoetewey commented 3 years ago

Comment written by Alex Lev on April 27, 2020 10:11:58:

Hi! Your code is full of bugs. Columns names are changed. Example: subject_classification instead of Subject Classification. Be careful while posting. Thanks for hint! Cheers!

AntoineSoetewey commented 3 years ago

Comment written by Alex Lev on April 27, 2020 10:11:58:

Hi! Your code is full of bugs. Columns names are changed. Example: subject_classification instead of Subject Classification. Be careful while posting. Thanks for hint! Cheers!

Comment written by Alex Lev on April 27, 2020 10:41:31:

springer_table <- download_springer_table()  specific_titles_list <- springer_table %>% select('Book Title', 'Subject Classification') %>%       filter(stringr::str_detect(        Subject Classification, # look for a pattern in the subject_calssification column      'Statistics' # specify the subject    )) %>%    pull(Book Title) download_springer_book_files(springer_books_titles = specific_titles_list)

AntoineSoetewey commented 3 years ago

Comment written by Alex Lev on April 27, 2020 10:11:58: Hi! Your code is full of bugs. Columns names are changed. Example: subject_classification instead of Subject Classification. Be careful while posting. Thanks for hint! Cheers!

Comment written by Alex Lev on April 27, 2020 10:41:31:

springer_table <- download_springer_table()  specific_titles_list <- springer_table %>% select('Book Title', 'Subject Classification') %>%       filter(stringr::str_detect(        Subject Classification, # look for a pattern in the subject_calssification column      'Statistics' # specify the subject    )) %>%    pull(Book Title) download_springer_book_files(springer_books_titles = specific_titles_list)

Comment written by Antoine Soetewey on April 27, 2020 12:09:16:

Hi Alex,

Thanks for your feedback. 

The author of the package edited it, and he changed the variable names. The code was correct at the time of writing the article though.

In any case, I contacted the author of the package and it is now back to the old variable names. So you should use book_title and subject_classification, exactly as in the article.

Let me know if you encounter any other issue.

Regards, Antoine

AntoineSoetewey commented 3 years ago

Comment written by Alfonso Chang on April 30, 2020 06:38:04:

Thanks for this contribution Antoine S. 

Any advice if for any reason the download process was cut off and it canceled the transfer? If I run the code again, would the reload resume or start from scratch?

Best regards, 
Alfonso Chang

AntoineSoetewey commented 3 years ago

Comment written by Alfonso Chang on April 30, 2020 06:38:04:

Thanks for this contribution Antoine S. 

Any advice if for any reason the download process was cut off and it canceled the transfer? If I run the code again, would the reload resume or start from scratch?

Best regards,  Alfonso Chang

Comment written by Alfonso Chang on April 30, 2020 07:12:13:

Would it be possible to download by folder? I think this method would be more accurate.  Thanks in advace. 
AC

AntoineSoetewey commented 3 years ago

Comment written by Alfonso Chang on April 30, 2020 06:38:04: Thanks for this contribution Antoine S.  Any advice if for any reason the download process was cut off and it canceled the transfer? If I run the code again, would the reload resume or start from scratch? Best regards,  Alfonso Chang

Comment written by Alfonso Chang on April 30, 2020 07:12:13:

Would it be possible to download by folder? I think this method would be more accurate.  Thanks in advace.  AC

Comment written by Antoine Soetewey on April 30, 2020 08:47:16:

Dear Alfonso,

This may be due to internet connection problem. 

At the moment, if you run the code again it would restart from scratch. This pull request will try to fix this, but this has not yet been implemented.

I have just suggested downloading the books by folder to the author of the package. I'll let you know his reply.

Regards, Antoine

AntoineSoetewey commented 3 years ago

Comment written by Alfonso Chang on April 30, 2020 06:38:04: Thanks for this contribution Antoine S.  Any advice if for any reason the download process was cut off and it canceled the transfer? If I run the code again, would the reload resume or start from scratch? Best regards,  Alfonso Chang

Comment written by Alfonso Chang on April 30, 2020 07:12:13: Would it be possible to download by folder? I think this method would be more accurate.  Thanks in advace.  AC

Comment written by Antoine Soetewey on April 30, 2020 08:47:16:

Dear Alfonso,

This may be due to internet connection problem. 

At the moment, if you run the code again it would restart from scratch. This pull request will try to fix this, but this has not yet been implemented.

I have just suggested downloading the books by folder to the author of the package. I'll let you know his reply.

Regards, Antoine

Comment written by Alfonso Chang on April 30, 2020 15:25:39:

Thank you so much Sir. I'll appreciate it. 

BR, AC

AntoineSoetewey commented 3 years ago

Comment written by pocheche on April 30, 2020 16:37:33:

Tried to change settings for epub download but does not work, please ....

AntoineSoetewey commented 3 years ago

Comment written by Cimi on April 30, 2020 17:39:10:

Can you please help me I am stuck on the first step...  I dont know where to put the code

AntoineSoetewey commented 3 years ago

Comment written by JC on April 30, 2020 18:06:03:

Hi! First of all, thanks for the post! 

I used this lines to download the ebooks:

setwd("path_of_your_choice") # where you want to save the books  download_springer_book_files() # download all of them at once

And at the end of the process, it appear on the console:
Warning messages:  1: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used  2: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used

What am I supposed to do?

AntoineSoetewey commented 3 years ago

Comment written by Cimi on April 30, 2020 17:39:10:

Can you please help me I am stuck on the first step...  I dont know where to put the code

Comment written by Antoine Soetewey on April 30, 2020 18:09:27:

Dear Cimi,

Run the code in the R console or in a script. 

Perhaps this article will help you to get started with R: https://statsandr.com/blog/how-to-install-r-and-rstudio/ (see section "the main components of RStudio").

Hope this helps. 

Regards, Antoine

AntoineSoetewey commented 3 years ago

Comment written by JC on April 30, 2020 18:06:03:

Hi! First of all, thanks for the post! 

I used this lines to download the ebooks:

setwd("path_of_your_choice") # where you want to save the books  download_springer_book_files() # download all of them at once

And at the end of the process, it appear on the console: Warning messages:  1: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used  2: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used

What am I supposed to do?

Comment written by Antoine Soetewey on April 30, 2020 18:13:33:

Dear JC,

Did you change path_of_your_choice with the desired path (e.g., your desktop or a specific folder on your computer)? 

See the section "set working directory" of this article if you still struggle: https://statsandr.com/blog/how-to-import-an-excel-file-in-rstudio/

Regards, Antoine

AntoineSoetewey commented 3 years ago

Comment written by JC on April 30, 2020 18:06:03: Hi! First of all, thanks for the post!  I used this lines to download the ebooks: setwd("path_of_your_choice") # where you want to save the books  download_springer_book_files() # download all of them at once And at the end of the process, it appear on the console: Warning messages:  1: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used  2: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used What am I supposed to do?

Comment written by Antoine Soetewey on April 30, 2020 18:13:33:

Dear JC,

Did you change path_of_your_choice with the desired path (e.g., your desktop or a specific folder on your computer)? 

See the section "set working directory" of this article if you still struggle: https://statsandr.com/blog/how-to-import-an-excel-file-in-rstudio/

Regards, Antoine

Comment written by JC on April 30, 2020 18:18:20:

Yes, yes. Sorry, I copy the line form the post and I forgot to put my path... Sorry for the mistake. I put a path to one folder of my desktop

AntoineSoetewey commented 3 years ago

Comment written by JC on April 30, 2020 18:06:03: Hi! First of all, thanks for the post!  I used this lines to download the ebooks: setwd("path_of_your_choice") # where you want to save the books  download_springer_book_files() # download all of them at once And at the end of the process, it appear on the console: Warning messages:  1: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used  2: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used What am I supposed to do?

Comment written by Antoine Soetewey on April 30, 2020 18:13:33: Dear JC, Did you change path_of_your_choice with the desired path (e.g., your desktop or a specific folder on your computer)?  See the section "set working directory" of this article if you still struggle: https://statsandr.com/blog/how-to-import-an-excel-file-in-rstudio/ Regards, Antoine

Comment written by JC on April 30, 2020 18:18:20:

Yes, yes. Sorry, I copy the line form the post and I forgot to put my path... Sorry for the mistake. I put a path to one folder of my desktop

Comment written by JC on April 30, 2020 18:46:22:

I mean that the Warning Messages appeared using my path. Sorry for the possible misunderstanding

AntoineSoetewey commented 3 years ago

Comment written by JC on April 30, 2020 18:06:03: Hi! First of all, thanks for the post!  I used this lines to download the ebooks: setwd("path_of_your_choice") # where you want to save the books  download_springer_book_files() # download all of them at once And at the end of the process, it appear on the console: Warning messages:  1: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used  2: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used What am I supposed to do?

Comment written by Antoine Soetewey on April 30, 2020 18:13:33: Dear JC, Did you change path_of_your_choice with the desired path (e.g., your desktop or a specific folder on your computer)?  See the section "set working directory" of this article if you still struggle: https://statsandr.com/blog/how-to-import-an-excel-file-in-rstudio/ Regards, Antoine

Comment written by JC on April 30, 2020 18:18:20: Yes, yes. Sorry, I copy the line form the post and I forgot to put my path... Sorry for the mistake. I put a path to one folder of my desktop

Comment written by JC on April 30, 2020 18:46:22:

I mean that the Warning Messages appeared using my path. Sorry for the possible misunderstanding

Comment written by Antoine Soetewey on April 30, 2020 18:53:05:

Good that you clarified this. 

It's the first time I see your issue. Could you open an issue on the GitHub page of the package? The author will probably be able to help you! And don't hesitate to let us know if you managed to fix it.

AntoineSoetewey commented 3 years ago

Comment written by JC on April 30, 2020 18:06:03: Hi! First of all, thanks for the post!  I used this lines to download the ebooks: setwd("path_of_your_choice") # where you want to save the books  download_springer_book_files() # download all of them at once And at the end of the process, it appear on the console: Warning messages:  1: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used  2: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used What am I supposed to do?

Comment written by Antoine Soetewey on April 30, 2020 18:13:33: Dear JC, Did you change path_of_your_choice with the desired path (e.g., your desktop or a specific folder on your computer)?  See the section "set working directory" of this article if you still struggle: https://statsandr.com/blog/how-to-import-an-excel-file-in-rstudio/ Regards, Antoine

Comment written by JC on April 30, 2020 18:18:20: Yes, yes. Sorry, I copy the line form the post and I forgot to put my path... Sorry for the mistake. I put a path to one folder of my desktop

Comment written by JC on April 30, 2020 18:46:22: I mean that the Warning Messages appeared using my path. Sorry for the possible misunderstanding

Comment written by Antoine Soetewey on April 30, 2020 18:53:05:

Good that you clarified this. 

It's the first time I see your issue. Could you open an issue on the GitHub page of the package? The author will probably be able to help you! And don't hesitate to let us know if you managed to fix it.

Comment written by JC on April 30, 2020 19:42:42:

Ok, thanks gor the support! :)

AntoineSoetewey commented 3 years ago

Comment written by Cimi on April 30, 2020 17:39:10: Can you please help me I am stuck on the first step...  I dont know where to put the code

Comment written by Antoine Soetewey on April 30, 2020 18:09:27:

Dear Cimi,

Run the code in the R console or in a script. 

Perhaps this article will help you to get started with R: https://statsandr.com/blog/how-to-install-r-and-rstudio/ (see section "the main components of RStudio").

Hope this helps. 

Regards, Antoine

Comment written by Cimi on April 30, 2020 23:04:49:

Thanks a LOTTT!!! 
You have my regards. 
Sincerely Cimi.

AntoineSoetewey commented 3 years ago

Comment written by Cimi on April 30, 2020 17:39:10: Can you please help me I am stuck on the first step...  I dont know where to put the code

Comment written by Antoine Soetewey on April 30, 2020 18:09:27: Dear Cimi, Run the code in the R console or in a script.  Perhaps this article will help you to get started with R: https://statsandr.com/blog/how-to-install-r-and-rstudio/ (see section "the main components of RStudio"). Hope this helps.  Regards, Antoine

Comment written by Cimi on April 30, 2020 23:04:49:

Thanks a LOTTT!!!  You have my regards.  Sincerely Cimi.

Comment written by Cimi on May 01, 2020 12:37:53:

Is There a possible way to download only the last 100 or so because my download got cut off(My mistake) and i have installed only the first 300

AntoineSoetewey commented 3 years ago

Comment written by Cimi on April 30, 2020 17:39:10: Can you please help me I am stuck on the first step...  I dont know where to put the code

Comment written by Antoine Soetewey on April 30, 2020 18:09:27: Dear Cimi, Run the code in the R console or in a script.  Perhaps this article will help you to get started with R: https://statsandr.com/blog/how-to-install-r-and-rstudio/ (see section "the main components of RStudio"). Hope this helps.  Regards, Antoine

Comment written by Cimi on April 30, 2020 23:04:49: Thanks a LOTTT!!!  You have my regards.  Sincerely Cimi.

Comment written by Cimi on May 01, 2020 12:37:53:

Is There a possible way to download only the last 100 or so because my download got cut off(My mistake) and i have installed only the first 300

Comment written by Antoine Soetewey on May 01, 2020 12:55:52:

Unfortunately no. 

At the moment you'll need to download all of them again. 

This pull request: https://github.com/renanxcortes/springerQuarantineBooksR/pull/19 will fix it, but it has not yet been implemented.

AntoineSoetewey commented 3 years ago

Comment written by Cimi on April 30, 2020 17:39:10: Can you please help me I am stuck on the first step...  I dont know where to put the code

Comment written by Antoine Soetewey on April 30, 2020 18:09:27: Dear Cimi, Run the code in the R console or in a script.  Perhaps this article will help you to get started with R: https://statsandr.com/blog/how-to-install-r-and-rstudio/ (see section "the main components of RStudio"). Hope this helps.  Regards, Antoine

Comment written by Cimi on April 30, 2020 23:04:49: Thanks a LOTTT!!!  You have my regards.  Sincerely Cimi.

Comment written by Cimi on May 01, 2020 12:37:53: Is There a possible way to download only the last 100 or so because my download got cut off(My mistake) and i have installed only the first 300

Comment written by Antoine Soetewey on May 01, 2020 12:55:52:

Unfortunately no. 

At the moment you'll need to download all of them again. 

This pull request: renanxcortes/springerQuarantineBooksR#19 will fix it, but it has not yet been implemented.

Comment written by Cimi on May 01, 2020 13:14:35:

Ok, either way thanks.

AntoineSoetewey commented 3 years ago

Comment written by Paul Niel on May 02, 2020 14:46:00:

Hi, I seem to run into an error: 

> download_springer_book_files()  Downloading title latest editions.                                                Processing... Fundamentals of Power Electronics (1 out of 391)  Error in http_error(get_file) : could not find function "http_error"

Is there a package missing? Or what would I need to install.

Thanks

AntoineSoetewey commented 3 years ago

Comment written by Paul Niel on May 02, 2020 14:46:00:

Hi, I seem to run into an error: 

download_springer_book_files()  Downloading title latest editions.                                                Processing... Fundamentals of Power Electronics (1 out of 391)  Error in http_error(get_file) : could not find function "http_error"

Is there a package missing? Or what would I need to install.

Thanks

Comment written by Antoine Soetewey on May 02, 2020 14:55:09:

Dear Paul,

Can you try again after having installed the {httr} package: 
install.packages('httr') library('httr')

Best, 
Antoine

AntoineSoetewey commented 3 years ago

Comment written by Eliza on May 02, 2020 16:58:12:

Can't install the package. It converts the dplyr warning into an error so it forces the installation to halt.
"Error: (converted from warning) package 'dplyr' was built under R version 3.6.3. Execution halted"

Any suggestion?

AntoineSoetewey commented 3 years ago

Comment written by Eliza on May 02, 2020 16:58:12:

Can't install the package. It converts the dplyr warning into an error so it forces the installation to halt. "Error: (converted from warning) package 'dplyr' was built under R version 3.6.3. Execution halted"

Any suggestion?

Comment written by Antoine Soetewey on May 02, 2020 17:46:41:

Dear Eliza,

It should be fixed now. Can you reinstall the package with:  devtools::install_github("renanxcortes/springerQuarantineBooksR", force = TRUE)

And see if it works?

AntoineSoetewey commented 3 years ago

Comment written by pocheche on April 30, 2020 16:37:33:

Tried to change settings for epub download but does not work, please ....

Comment written by Antoine Soetewey on May 03, 2020 09:25:24:

Hard to fix your issue without seeing the error. If you still struggle, please add the error here or open an issue on GitHub: https://github.com/renanxcortes/springerQuarantineBooksR/issues

AntoineSoetewey commented 3 years ago

Comment written by Christian Yosser Alcarraz Vale on May 04, 2020 06:24:41:

These packages have more recent versions available.  It is recommended to update all of them.  Which would you like to update?  

1: All                                         2: CRAN packages only                          3: None                                        4: pkgconfig  (2.0.1    -> 2.0.3   ) [CRAN]    5: assertthat (0.2.0    -> 0.2.1   ) [CRAN]    6: purrr      (0.3.3    -> 0.3.4   ) [CRAN]    7: R6         (2.2.2    -> 2.4.1   ) [CRAN]    8: Rcpp       (1.0.4    -> 1.0.4.6 ) [CRAN]    9: tibble     (3.0.0    -> 3.0.1   ) [CRAN] 
10: BH         (1.66.0-1 -> 1.72.0-3) [CRAN] 
11: stringi    (1.1.7    -> 1.4.6   ) [CRAN] 
12: curl       (3.2      -> 4.3     ) [CRAN] 
13: mime       (0.5      -> 0.9     ) [CRAN] 
14: openssl    (1.0.1    -> 1.4.1   ) [CRAN] 
15: lubridate  (1.7.4    -> 1.7.8   ) [CRAN]
Enter one or more numbers, or an empty line to skip updates:

then 1 put 1 but.....

Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) cannot remove prior installation of package ‚Äòrlang‚Äô  In addition: Warning messages:  1: In untar2(tarfile, files, list, exdir) :    skipping pax global extended headers  2: In untar2(tarfile, files, list, exdir) :    skipping pax global extended headers

AntoineSoetewey commented 3 years ago

Comment written by Christian Yosser Alcarraz Vale on May 04, 2020 06:24:41:

These packages have more recent versions available.  It is recommended to update all of them.  Which would you like to update?  

1: All                                         2: CRAN packages only                          3: None                                        4: pkgconfig  (2.0.1    -> 2.0.3   ) [CRAN]    5: assertthat (0.2.0    -> 0.2.1   ) [CRAN]    6: purrr      (0.3.3    -> 0.3.4   ) [CRAN]    7: R6         (2.2.2    -> 2.4.1   ) [CRAN]    8: Rcpp       (1.0.4    -> 1.0.4.6 ) [CRAN]    9: tibble     (3.0.0    -> 3.0.1   ) [CRAN]  10: BH         (1.66.0-1 -> 1.72.0-3) [CRAN]  11: stringi    (1.1.7    -> 1.4.6   ) [CRAN]  12: curl       (3.2      -> 4.3     ) [CRAN]  13: mime       (0.5      -> 0.9     ) [CRAN]  14: openssl    (1.0.1    -> 1.4.1   ) [CRAN]  15: lubridate  (1.7.4    -> 1.7.8   ) [CRAN] Enter one or more numbers, or an empty line to skip updates:

then 1 put 1 but.....

Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) cannot remove prior installation of package ‚Äòrlang‚Äô  In addition: Warning messages:  1: In untar2(tarfile, files, list, exdir) :    skipping pax global extended headers  2: In untar2(tarfile, files, list, exdir) :    skipping pax global extended headers

Comment written by Antoine Soetewey on May 04, 2020 08:11:12:

Dear Christian,

Can you try again without downloading updates, so by typing "3".

If you still have an issue, please open an issue on GitHub so the author of the package can have a look at it and hopefully fix it.

Best, 
Antoine

AntoineSoetewey commented 3 years ago

Comment written by Christian Yosser Alcarraz Vale on May 04, 2020 06:24:41: These packages have more recent versions available.  It is recommended to update all of them.  Which would you like to update?   1: All                                         2: CRAN packages only                          3: None                                        4: pkgconfig  (2.0.1    -> 2.0.3   ) [CRAN]    5: assertthat (0.2.0    -> 0.2.1   ) [CRAN]    6: purrr      (0.3.3    -> 0.3.4   ) [CRAN]    7: R6         (2.2.2    -> 2.4.1   ) [CRAN]    8: Rcpp       (1.0.4    -> 1.0.4.6 ) [CRAN]    9: tibble     (3.0.0    -> 3.0.1   ) [CRAN]  10: BH         (1.66.0-1 -> 1.72.0-3) [CRAN]  11: stringi    (1.1.7    -> 1.4.6   ) [CRAN]  12: curl       (3.2      -> 4.3     ) [CRAN]  13: mime       (0.5      -> 0.9     ) [CRAN]  14: openssl    (1.0.1    -> 1.4.1   ) [CRAN]  15: lubridate  (1.7.4    -> 1.7.8   ) [CRAN] Enter one or more numbers, or an empty line to skip updates: then 1 put 1 but..... Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) cannot remove prior installation of package ‚Äòrlang‚Äô  In addition: Warning messages:  1: In untar2(tarfile, files, list, exdir) :    skipping pax global extended headers  2: In untar2(tarfile, files, list, exdir) :    skipping pax global extended headers

Comment written by Antoine Soetewey on May 04, 2020 08:11:12:

Dear Christian,

Can you try again without downloading updates, so by typing "3".

If you still have an issue, please open an issue on GitHub so the author of the package can have a look at it and hopefully fix it.

Best,  Antoine

Comment written by Claire Joy Gruyal on May 04, 2020 07:24:26:

same problem, still error if suggested code used.

AntoineSoetewey commented 3 years ago

Comment written by Christian Yosser Alcarraz Vale on May 04, 2020 06:24:41: These packages have more recent versions available.  It is recommended to update all of them.  Which would you like to update?   1: All                                         2: CRAN packages only                          3: None                                        4: pkgconfig  (2.0.1    -> 2.0.3   ) [CRAN]    5: assertthat (0.2.0    -> 0.2.1   ) [CRAN]    6: purrr      (0.3.3    -> 0.3.4   ) [CRAN]    7: R6         (2.2.2    -> 2.4.1   ) [CRAN]    8: Rcpp       (1.0.4    -> 1.0.4.6 ) [CRAN]    9: tibble     (3.0.0    -> 3.0.1   ) [CRAN]  10: BH         (1.66.0-1 -> 1.72.0-3) [CRAN]  11: stringi    (1.1.7    -> 1.4.6   ) [CRAN]  12: curl       (3.2      -> 4.3     ) [CRAN]  13: mime       (0.5      -> 0.9     ) [CRAN]  14: openssl    (1.0.1    -> 1.4.1   ) [CRAN]  15: lubridate  (1.7.4    -> 1.7.8   ) [CRAN] Enter one or more numbers, or an empty line to skip updates: then 1 put 1 but..... Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) cannot remove prior installation of package ‚Äòrlang‚Äô  In addition: Warning messages:  1: In untar2(tarfile, files, list, exdir) :    skipping pax global extended headers  2: In untar2(tarfile, files, list, exdir) :    skipping pax global extended headers

Comment written by Antoine Soetewey on May 04, 2020 08:11:12: Dear Christian, Can you try again without downloading updates, so by typing "3". If you still have an issue, please open an issue on GitHub so the author of the package can have a look at it and hopefully fix it. Best,  Antoine

Comment written by Claire Joy Gruyal on May 04, 2020 07:24:26:

same problem, still error if suggested code used.

Comment written by Antoine Soetewey on May 04, 2020 08:08:55:

Dear Claire,

Sorry about that. May I ask you to open an issue on GitHub so the author of the package can have a look and hopefully fix it?

Best, 
Antoine

AntoineSoetewey commented 3 years ago

Comment written by Christian Yosser Alcarraz Vale on May 04, 2020 06:24:41: These packages have more recent versions available.  It is recommended to update all of them.  Which would you like to update?   1: All                                         2: CRAN packages only                          3: None                                        4: pkgconfig  (2.0.1    -> 2.0.3   ) [CRAN]    5: assertthat (0.2.0    -> 0.2.1   ) [CRAN]    6: purrr      (0.3.3    -> 0.3.4   ) [CRAN]    7: R6         (2.2.2    -> 2.4.1   ) [CRAN]    8: Rcpp       (1.0.4    -> 1.0.4.6 ) [CRAN]    9: tibble     (3.0.0    -> 3.0.1   ) [CRAN]  10: BH         (1.66.0-1 -> 1.72.0-3) [CRAN]  11: stringi    (1.1.7    -> 1.4.6   ) [CRAN]  12: curl       (3.2      -> 4.3     ) [CRAN]  13: mime       (0.5      -> 0.9     ) [CRAN]  14: openssl    (1.0.1    -> 1.4.1   ) [CRAN]  15: lubridate  (1.7.4    -> 1.7.8   ) [CRAN] Enter one or more numbers, or an empty line to skip updates: then 1 put 1 but..... Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) cannot remove prior installation of package ‚Äòrlang‚Äô  In addition: Warning messages:  1: In untar2(tarfile, files, list, exdir) :    skipping pax global extended headers  2: In untar2(tarfile, files, list, exdir) :    skipping pax global extended headers

Comment written by Antoine Soetewey on May 04, 2020 08:11:12: Dear Christian, Can you try again without downloading updates, so by typing "3". If you still have an issue, please open an issue on GitHub so the author of the package can have a look at it and hopefully fix it. Best,  Antoine

Comment written by Claire Joy Gruyal on May 04, 2020 07:24:26: same problem, still error if suggested code used.

Comment written by Antoine Soetewey on May 04, 2020 08:08:55:

Dear Claire,

Sorry about that. May I ask you to open an issue on GitHub so the author of the package can have a look and hopefully fix it?

Best,  Antoine

Comment written by Claire Joy Gruyal on May 04, 2020 08:22:54:

I tried "none" as you suggested, after many tries this option works for me

AntoineSoetewey commented 3 years ago

Comment written by Paul Niel on May 02, 2020 14:46:00: Hi, I seem to run into an error: 

download_springer_book_files()  Downloading title latest editions.                                                Processing... Fundamentals of Power Electronics (1 out of 391)  Error in http_error(get_file) : could not find function "http_error"

Is there a package missing? Or what would I need to install. Thanks

Comment written by Antoine Soetewey on May 02, 2020 14:55:09:

Dear Paul,

Can you try again after having installed the {httr} package:  install.packages('httr') library('httr')

Best,  Antoine

Comment written by Paul Niel on May 04, 2020 11:01:28:

Thanks - that worked great!

AntoineSoetewey commented 3 years ago

Comment written by Neh on May 04, 2020 15:42:43:

Please help, I got this error while trying "download_springer_book_files()": 

Error: Evaluation error: zip file 'C:\Users\vr237yr\AppData\Local\Temp\Rtmp0028gI\file2ce49701a17.xlsx' cannot be opened.

AntoineSoetewey commented 3 years ago

Comment written by Neh on May 04, 2020 15:42:43:

Please help, I got this error while trying "download_springer_book_files()": 

Error: Evaluation error: zip file 'C:\Users\vr237yr\AppData\Local\Temp\Rtmp0028gI\file2ce49701a17.xlsx' cannot be opened.

Comment written by Antoine Soetewey on May 04, 2020 17:01:51:

Dear Neh,

This issue should be fixed by now. Can you reinstall the package and try again: 

devtools::install_github("renanxcortes/springerQuarantineBooksR", force = TRUE)

Best, 
Antoine

AntoineSoetewey commented 3 years ago

Comment written by Neh on May 04, 2020 15:42:43: Please help, I got this error while trying "download_springer_book_files()":  Error: Evaluation error: zip file 'C:\Users\vr237yr\AppData\Local\Temp\Rtmp0028gI\file2ce49701a17.xlsx' cannot be opened.

Comment written by Antoine Soetewey on May 04, 2020 17:01:51:

Dear Neh,

This issue should be fixed by now. Can you reinstall the package and try again: 

devtools::install_github("renanxcortes/springerQuarantineBooksR", force = TRUE)

Best,  Antoine

Comment written by Neh on May 04, 2020 19:17:55:

That worked perfectly. Thanks a lot for your effort !

AntoineSoetewey commented 3 years ago

Comment written by Yan on May 05, 2020 06:28:18:

Really helpful, thank you so much!

AntoineSoetewey commented 3 years ago

Comment written by JC on April 30, 2020 18:06:03: Hi! First of all, thanks for the post!  I used this lines to download the ebooks: setwd("path_of_your_choice") # where you want to save the books  download_springer_book_files() # download all of them at once And at the end of the process, it appear on the console: Warning messages:  1: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used  2: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used What am I supposed to do?

Comment written by Antoine Soetewey on April 30, 2020 18:13:33: Dear JC, Did you change path_of_your_choice with the desired path (e.g., your desktop or a specific folder on your computer)?  See the section "set working directory" of this article if you still struggle: https://statsandr.com/blog/how-to-import-an-excel-file-in-rstudio/ Regards, Antoine

Comment written by JC on April 30, 2020 18:18:20: Yes, yes. Sorry, I copy the line form the post and I forgot to put my path... Sorry for the mistake. I put a path to one folder of my desktop

Comment written by JC on April 30, 2020 18:46:22: I mean that the Warning Messages appeared using my path. Sorry for the possible misunderstanding

Comment written by Antoine Soetewey on April 30, 2020 18:53:05: Good that you clarified this.  It's the first time I see your issue. Could you open an issue on the GitHub page of the package? The author will probably be able to help you! And don't hesitate to let us know if you managed to fix it.

Comment written by JC on April 30, 2020 19:42:42:

Ok, thanks gor the support! :)

Comment written by Lu on May 06, 2020 18:11:18:

Hi JC! I've had the same problem. Did you fix your problem?

AntoineSoetewey commented 3 years ago

Comment written by Tiago Tavares on May 06, 2020 18:12:57:

Hi,

I get this error:

Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) cannot remove prior installation of package rlang  > library(springerQuarantineBooksR)  Error in library(springerQuarantineBooksR) :     there is no package called springerQuarantineBooksR

Anyone would be able to help?

AntoineSoetewey commented 3 years ago

Comment written by Tiago Tavares on May 06, 2020 18:12:57:

Hi,

I get this error:

Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) cannot remove prior installation of package rlang  > library(springerQuarantineBooksR)  Error in library(springerQuarantineBooksR) :     there is no package called springerQuarantineBooksR

Anyone would be able to help?

Comment written by Antoine Soetewey on May 06, 2020 18:52:04:

Dear Tiago,

Did you try after reinstalling the rlang package? 

If you still struggle, don't hesitate to open an issue on GitHub (https://github.com/renanxcortes/springerQuarantineBooksR/issues) so that the author can help you to fix it.

Best, 
Antoine

AntoineSoetewey commented 3 years ago

Comment written by JC on April 30, 2020 18:06:03: Hi! First of all, thanks for the post!  I used this lines to download the ebooks: setwd("path_of_your_choice") # where you want to save the books  download_springer_book_files() # download all of them at once And at the end of the process, it appear on the console: Warning messages:  1: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used  2: In if (!dir.exists(current_folder)) { :  the condition has length > 1 and only the first element will be used What am I supposed to do?

Comment written by Antoine Soetewey on April 30, 2020 18:13:33: Dear JC, Did you change path_of_your_choice with the desired path (e.g., your desktop or a specific folder on your computer)?  See the section "set working directory" of this article if you still struggle: https://statsandr.com/blog/how-to-import-an-excel-file-in-rstudio/ Regards, Antoine

Comment written by JC on April 30, 2020 18:18:20: Yes, yes. Sorry, I copy the line form the post and I forgot to put my path... Sorry for the mistake. I put a path to one folder of my desktop

Comment written by JC on April 30, 2020 18:46:22: I mean that the Warning Messages appeared using my path. Sorry for the possible misunderstanding

Comment written by Antoine Soetewey on April 30, 2020 18:53:05: Good that you clarified this.  It's the first time I see your issue. Could you open an issue on the GitHub page of the package? The author will probably be able to help you! And don't hesitate to let us know if you managed to fix it.

Comment written by JC on April 30, 2020 19:42:42: Ok, thanks gor the support! :)

Comment written by Lu on May 06, 2020 18:11:18:

Hi JC! I've had the same problem. Did you fix your problem?

Comment written by Antoine Soetewey on May 06, 2020 18:53:54:

Dear Lu,

Don't hesitate to open an issue on GitHub (https://github.com/renanxcortes/springerQuarantineBooksR/issues) if you still have an issue. The author of the package may be able to help you to fix it.

Best, 
Antoine

AntoineSoetewey commented 3 years ago

Comment written by Tiago Tavares on May 06, 2020 18:12:57: Hi, I get this error: Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) cannot remove prior installation of package rlang  > library(springerQuarantineBooksR)  Error in library(springerQuarantineBooksR) :     there is no package called springerQuarantineBooksR Anyone would be able to help?

Comment written by Antoine Soetewey on May 06, 2020 18:52:04:

Dear Tiago,

Did you try after reinstalling the rlang package? 

If you still struggle, don't hesitate to open an issue on GitHub (https://github.com/renanxcortes/springerQuarantineBooksR/issues) so that the author can help you to fix it.

Best,  Antoine

Comment written by Tiago Tavares on May 06, 2020 18:59:17:

Thank you for your reply Antoine!

I did and then this happens:

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :     there is no package called 'tictoc'  Calls: <anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart  Execution halted  ERROR: lazy loading failed for package 'springerQuarantineBooksR'  * removing 'C:/Users/tiago/OneDrive/Documents/R/win-library/4.0/springerQuarantineBooksR'  Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) installation of package C:/Users/tiago/AppData/Local/Temp/RtmpA5yx9x/file32003d302569/springerQuarantineBooksR_0.1.0.tar.gz had non-zero exit status

Many thanks

AntoineSoetewey commented 3 years ago

Comment written by Tiago Tavares on May 06, 2020 18:12:57: Hi, I get this error: Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) cannot remove prior installation of package rlang  > library(springerQuarantineBooksR)  Error in library(springerQuarantineBooksR) :     there is no package called springerQuarantineBooksR Anyone would be able to help?

Comment written by Antoine Soetewey on May 06, 2020 18:52:04: Dear Tiago, Did you try after reinstalling the rlang package?  If you still struggle, don't hesitate to open an issue on GitHub (https://github.com/renanxcortes/springerQuarantineBooksR/issues) so that the author can help you to fix it. Best,  Antoine

Comment written by Tiago Tavares on May 06, 2020 18:59:17:

Thank you for your reply Antoine!

I did and then this happens:

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :     there is no package called 'tictoc'  Calls: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart  Execution halted  ERROR: lazy loading failed for package 'springerQuarantineBooksR'  * removing 'C:/Users/tiago/OneDrive/Documents/R/win-library/4.0/springerQuarantineBooksR'  Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) installation of package C:/Users/tiago/AppData/Local/Temp/RtmpA5yx9x/file32003d302569/springerQuarantineBooksR_0.1.0.tar.gz had non-zero exit status

Many thanks

Comment written by Antoine Soetewey on May 06, 2020 19:32:27:

Not sure whether it helps but try again after having installed the package tictoc. 

If not, the best thing would be to open an issue on GitHub (https://github.com/renanxcortes/springerQuarantineBooksR/issues).

Best, 
Antoine

AntoineSoetewey commented 3 years ago

Comment written by Tiago Tavares on May 06, 2020 18:12:57: Hi, I get this error: Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) cannot remove prior installation of package rlang  > library(springerQuarantineBooksR)  Error in library(springerQuarantineBooksR) :     there is no package called springerQuarantineBooksR Anyone would be able to help?

Comment written by Antoine Soetewey on May 06, 2020 18:52:04: Dear Tiago, Did you try after reinstalling the rlang package?  If you still struggle, don't hesitate to open an issue on GitHub (https://github.com/renanxcortes/springerQuarantineBooksR/issues) so that the author can help you to fix it. Best,  Antoine

Comment written by Tiago Tavares on May 06, 2020 18:59:17: Thank you for your reply Antoine! I did and then this happens: Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :     there is no package called 'tictoc'  Calls: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart  Execution halted  ERROR: lazy loading failed for package 'springerQuarantineBooksR'  * removing 'C:/Users/tiago/OneDrive/Documents/R/win-library/4.0/springerQuarantineBooksR'  Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) installation of package C:/Users/tiago/AppData/Local/Temp/RtmpA5yx9x/file32003d302569/springerQuarantineBooksR_0.1.0.tar.gz had non-zero exit status Many thanks

Comment written by Antoine Soetewey on May 06, 2020 19:32:27:

Not sure whether it helps but try again after having installed the package tictoc. 

If not, the best thing would be to open an issue on GitHub (https://github.com/renanxcortes/springerQuarantineBooksR/issues).

Best,  Antoine

Comment written by Irsyad Riandri DP on May 07, 2020 18:13:22:

Hi, Tiago,  

I got exactly the same error like you had, and like Antoine said, I tried to install the tictoc package, and it runs perfectly. Hope you did it as well

AntoineSoetewey commented 3 years ago

Comment written by Tiago Tavares on May 06, 2020 18:12:57: Hi, I get this error: Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) cannot remove prior installation of package rlang  > library(springerQuarantineBooksR)  Error in library(springerQuarantineBooksR) :     there is no package called springerQuarantineBooksR Anyone would be able to help?

Comment written by Antoine Soetewey on May 06, 2020 18:52:04: Dear Tiago, Did you try after reinstalling the rlang package?  If you still struggle, don't hesitate to open an issue on GitHub (https://github.com/renanxcortes/springerQuarantineBooksR/issues) so that the author can help you to fix it. Best,  Antoine

Comment written by Tiago Tavares on May 06, 2020 18:59:17: Thank you for your reply Antoine! I did and then this happens: Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :     there is no package called 'tictoc'  Calls: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart  Execution halted  ERROR: lazy loading failed for package 'springerQuarantineBooksR'  * removing 'C:/Users/tiago/OneDrive/Documents/R/win-library/4.0/springerQuarantineBooksR'  Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) installation of package C:/Users/tiago/AppData/Local/Temp/RtmpA5yx9x/file32003d302569/springerQuarantineBooksR_0.1.0.tar.gz had non-zero exit status Many thanks

Comment written by Antoine Soetewey on May 06, 2020 19:32:27:

Not sure whether it helps but try again after having installed the package tictoc. 

If not, the best thing would be to open an issue on GitHub (https://github.com/renanxcortes/springerQuarantineBooksR/issues).

Best,  Antoine

Comment written by Irsyad Riandri DP on May 07, 2020 18:14:50:

Thank you so much Antoine, this is helpful

AntoineSoetewey commented 3 years ago

Comment written by Earl Glynn on May 10, 2020 19:17:00:

After updating all packages using R 3.6.0 on Windows, I could not get  the installation to work

devtools::install_github("renanxcortes/springerQuarantineBooksR") with or without a force = TRUE. 

I couldn't get around the error:
Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) installation of package C:/Users/efg/AppData/Local/Temp/RtmpkDN3Ua/file47d44bc566d5/springerQuarantineBooksR_0.1.0.tar.gz had non-zero exit status

Instead of waiting for a fix, I used 7zip to extract the files from the tar.gz file mentioned in the error: springerQuarantineBooksR_0.1.0.tar.gz -> springerQuarantineBooksR_0.1.0.tar -> springerQuarantineBooksR folder From the R subfolder, copy functions from files into your own script or RStudio notebook:  download_springer_table.R,   download_springer_book.R,   download_springer_book_files.R

Add these packages and everything worked for me then:
library(magrittr) # extract2  library(httr)     # GET  library(readxl)   # read_excel  library(janitor)  # clean_names download_springer_book_files() I added a separate call to download_springer_table to get a book list in an Excel file: springerTable <- download_springer_table()  springerTable library(writexl)  # write_xlsx  write_xlsx(springerTable, "Springer-Table-of-Books.xlsx")

I also grabbed all the German-language books: 
download_springer_book_files(lan = 'ger')

Apparently the package installation process is more complicated than the three R functions that do all the work.

AntoineSoetewey commented 3 years ago

Comment written by Earl Glynn on May 10, 2020 19:17:00:

After updating all packages using R 3.6.0 on Windows, I could not get  the installation to work

devtools::install_github("renanxcortes/springerQuarantineBooksR") with or without a force = TRUE. 

I couldn't get around the error: Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) installation of package C:/Users/efg/AppData/Local/Temp/RtmpkDN3Ua/file47d44bc566d5/springerQuarantineBooksR_0.1.0.tar.gz had non-zero exit status

Instead of waiting for a fix, I used 7zip to extract the files from the tar.gz file mentioned in the error: springerQuarantineBooksR_0.1.0.tar.gz -> springerQuarantineBooksR_0.1.0.tar -> springerQuarantineBooksR folder From the R subfolder, copy functions from files into your own script or RStudio notebook:  download_springer_table.R,   download_springer_book.R,   download_springer_book_files.R

Add these packages and everything worked for me then: library(magrittr) # extract2  library(httr)     # GET  library(readxl)   # read_excel  library(janitor)  # clean_names download_springer_book_files() I added a separate call to download_springer_table to get a book list in an Excel file: springerTable <- download_springer_table()  springerTable library(writexl)  # write_xlsx  write_xlsx(springerTable, "Springer-Table-of-Books.xlsx")

I also grabbed all the German-language books:  download_springer_book_files(lan = 'ger')

Apparently the package installation process is more complicated than the three R functions that do all the work.

Comment written by Antoine Soetewey on May 10, 2020 20:44:00:

Dear Earl,

Good to hear that you found a workaround. 

If in the future you want to use the package, feel free to open an issue on GitHub (https://github.com/renanxcortes/springerQuarantineBooksR), the author of the package will probably be able to fix it!

Enjoy the books.

Best, 
Antoine

AntoineSoetewey commented 3 years ago

Comment written by Javier Beltran on May 11, 2020 09:54:02:

Thanks for the initiative, but the installation does not work. I have updated all the packages and the error keeps saying: 
Error: (converted from warning) package 'dplyr' was built under R version 3.6.3  Execution halted 
ERROR: lazy loading failed for package 'springerQuarantineBooksR' 
removing 'C:/Program Files/R/R-3.6.1/library/springerQuarantineBooksR' 
Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) installation of package C:/Users/n9675230/AppData/Local/Temp/RtmpM3OxTa/file2030675728e3/springerQuarantineBooksR_0.1.0.tar.gz had non-zero exit status

I will keep trying...Thanks again!!!!

AntoineSoetewey commented 3 years ago

Comment written by Javier Beltran on May 11, 2020 09:54:02:

Thanks for the initiative, but the installation does not work. I have updated all the packages and the error keeps saying:  Error: (converted from warning) package 'dplyr' was built under R version 3.6.3  Execution halted  ERROR: lazy loading failed for package 'springerQuarantineBooksR'  removing 'C:/Program Files/R/R-3.6.1/library/springerQuarantineBooksR'  Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) installation of package C:/Users/n9675230/AppData/Local/Temp/RtmpM3OxTa/file2030675728e3/springerQuarantineBooksR_0.1.0.tar.gz had non-zero exit status

I will keep trying...Thanks again!!!!

Comment written by Antoine Soetewey on May 11, 2020 10:10:28:

Dear Javier,

Can you try again after having installed the {dplyr} package:  install.packages("dplyr")

If this does not fix the issue, feel free to open an issue on GitHub, the author of the package will probably be able to fix it.

Hope this helps.

Best, 
Antoine

AntoineSoetewey commented 3 years ago

Comment written by Javier Beltran on May 11, 2020 09:54:02: Thanks for the initiative, but the installation does not work. I have updated all the packages and the error keeps saying:  Error: (converted from warning) package 'dplyr' was built under R version 3.6.3  Execution halted  ERROR: lazy loading failed for package 'springerQuarantineBooksR'  removing 'C:/Program Files/R/R-3.6.1/library/springerQuarantineBooksR'  Error: Failed to install 'springerQuarantineBooksR' from GitHub:    (converted from warning) installation of package C:/Users/n9675230/AppData/Local/Temp/RtmpM3OxTa/file2030675728e3/springerQuarantineBooksR_0.1.0.tar.gz had non-zero exit status I will keep trying...Thanks again!!!!

Comment written by Antoine Soetewey on May 11, 2020 10:10:28:

Dear Javier,

Can you try again after having installed the {dplyr} package:  install.packages("dplyr")

If this does not fix the issue, feel free to open an issue on GitHub, the author of the package will probably be able to fix it.

Hope this helps.

Best,  Antoine

Comment written by Javier Beltran on May 11, 2020 11:12:07:

Thanks for your response. As I mentioned before, I updated all the packages, included dplyr, and the error message is still the same. I will put an issue about "installation problems". Thanks again!

AntoineSoetewey commented 3 years ago

Comment written by Gessica Vasconcelos on May 13, 2020 21:47:54:

Thank you for the code! It was very helpful! I had an issue when trying to download the files but then I realized that R was outdated. If someone is having issues check and update R. It might solve your problem as well.

AntoineSoetewey commented 3 years ago

Comment written by Gessica Vasconcelos on May 13, 2020 21:47:54:

Thank you for the code! It was very helpful! I had an issue when trying to download the files but then I realized that R was outdated. If someone is having issues check and update R. It might solve your problem as well.

Comment written by Antoine Soetewey on May 14, 2020 05:23:21:

Thanks for your suggestion Gessica!