DS4PS / cpp-527-spr-2021

http://ds4ps.org/cpp-527-spr-2021/
0 stars 0 forks source link

Github Issue #5

Open DMBurwell opened 3 years ago

DMBurwell commented 3 years ago

So I have gone through all of the steps and got everything pushed to Github, but when I tried to test my package to see if it worked, I am getting an error message saying that the file cannot be found. Any ideas for a fix?

2021-01-29

DMBurwell commented 3 years ago

Okay, so by going into the settings tab on github, I was able to change permissions and make it publicly available, eliminating the above issue, but now I am getting the following error message:

`> devtools::install_github( "DMBurwell/montyhall" ) Downloading GitHub repo DMBurwell/montyhall@HEAD

√ checking for file 'C:\Users\danic\AppData\Local\Temp\RtmpQvwO06\remotes5c985e51142f\DMBurwell-montyhall-08ef990/DESCRIPTION' (364ms)

E checking DESCRIPTION meta-information Authors@R field gives no person with maintainer role, valid email address and non-empty name.

See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual.

Error: Failed to install 'montyhall' from GitHub: System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr: E> checking for file 'C:\Users\danic\AppData\Local\Temp\RtmpQvwO06\remotes5c985e51142f\DMBurwell-montyhall-08ef990/DESCRIPTION' ... OK E> preparing 'montyhall': E> * checking DESCRIPTION meta-information ... ERROR E> Authors@R field gives no person with maintainer role, valid email E> address and non-empty name. E> E> See section 'The DESCRIPTION file' in the 'Writing R Extensions' E> manual. E>

`

lecy commented 3 years ago

Have you filled out the DESCRIPTION file yet?

lecy commented 3 years ago
Package: montyhall
Title: What the Package Does (One Line, Title Case)
Version: 0.0.0.9000
Authors@R: 
    person(given = "First",
           family = "Last",
           role = c("aut", "cre"),
           email = "first.last@example.com",
           comment = c(ORCID = "YOUR-ORCID-ID"))
Description: What the package does (one paragraph).
License: What license it uses
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.1
DMBurwell commented 3 years ago

I did fill out out and made sure there was nothing missing aside from the id mentioned on the previous board.

lecy commented 3 years ago

Can you please share the text in your file? Maybe there is something off.

DMBurwell commented 3 years ago

After playing with it some more, I was able to get a little further. My DESCRIPTION file has the following:

Package: montyhall
Title: Recreating the Monty Hall Problem Game
Version: 0.0.0.9000
Authors@R: 
    person("Danica",
           "Burwell",
           role = c("aut", "cre"),
           email = "danica.burwell@outlook.com" )
Author: Danica Burwell [aut,cre]
Description:  The game setup is designed after the TV show "Let's Make a Deal", where a player chooses one of three doors in the hope of revealing a car and not a goat. Once the player select's their first door, the game host opens another door, revealing a goat. Then the player is given the opportunity to stick with their original door selection or switch to the other unopened door. It has been debated as to whether it is more advantageous to switch doors or to stay with the original selection. This simulation allows us to see the odds of winning based on either strategy.
License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a
    license
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1

The most recent set of error I am getting is below:

> devtools::install_github( "DMBurwell/montyhall" )
Downloading GitHub repo DMBurwell/montyhall@HEAD
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: Dplyr (1.0.0 -> 1.0.3) [CRAN]

Enter one or more numbers, or an empty line to skip updates:1
Dplyr (1.0.0 -> 1.0.3) [CRAN]
Installing 1 packages: Dplyr
Installing package into ‘C:/Users/danic/OneDrive/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Error: Failed to install 'montyhall' from GitHub:
  (converted from warning) package ‘Dplyr’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
> 

I just updated R within the last week, so I am pretty sure I do have the latest version.

lecy commented 3 years ago

This is happening because you misspelled dplyr in your DESCRIPTION file.

R is trying to find the package "Dplyr" instead of "dplyr".

Since it will not find a package that is already installed it tries to search on the CRAN, which is where you are getting the error "package ‘Dplyr’ is not available for this version of R" because the package does not exist.

If you update the DESCRIPTION file everything else looks pretty good.