DS4PS / cpp-527-fall-2020

http://ds4ps.org/cpp-527-fall-2020/
0 stars 1 forks source link

install_github() failed to install #23

Open nicolehillsmall opened 3 years ago

nicolehillsmall commented 3 years ago

I wanted to verify that my package would install, so in R I ran

devtools::install_github( "nicoletriestocode/montyhall" )

and I received the following error:

Downloading GitHub repo nicoletriestocode/montyhall@HEAD Error: Failed to install 'montyhall' from GitHub: Line starting '#' Make a Deal" wh ...' is malformed!

I removed my package from GitHub and went through the process again, but I got the same error.

Any suggestions, @lecy ?

nicolehillsmall commented 3 years ago

UPDATE: I figured it out :)

My description in DESCRIPTION was too long...I shortened it to a sentence and it installed just fine!

lecy commented 3 years ago

Ok, great - because I had no idea what that error meant! :-)

ecking commented 3 years ago

I'm getting a similar message: I'm not entirely sure what to do. The description file looks right and includes the depends: dplyr. And I'm unsure what to do about the R versioning. I recently installed the newest version I thought and that was kind of a nightmare so I hope I don't have to go through that again. Thoughts?

In addition: Warning message: package ‘quanteda’ was built under R version 3.6.3 Error: Failed to install 'montyhall' from GitHub: Line starting 'dplyr ...' is malformed!

lecy commented 3 years ago

The documents are pretty sensitive to spaces and characters. Can you share your description file?

The error would suggest it's the line that start with the dplyr package.

JayCastro commented 3 years ago

Hey lecy can I do my code thru on making a package because the way you did it didn't help me (not your fault, I just got a lot of errors on my end and got stuck) and I found an alternative but got the results you wanted?

ecking commented 3 years ago

Ugh so now I'm getting the error below when I go to install the package. The NAMESPACE file looks fine. All the files are uploaded in github... whats wrong :sob:

` installing source* package 'montyhall' ... using staged installation help No man pages found in package 'montyhall' installing help indices building package indices testing if installed package can be loaded from temporary location arch - i386 Error: package or namespace load failed for 'montyhall' in namespaceExport(ns, exports): undefined exports: change_door, create_game, determine_winner, open_goat_door, play_game, play_n_games, select_door Error: loading failed Execution halted *** arch - x64 Error: package or namespace load failed for 'montyhall' in namespaceExport(ns, exports): undefined exports: change_door, create_game, determine_winner, open_goat_door, play_game, play_n_games, select_door Error: loading failed Execution halted ERROR: loading failed for 'i386', 'x64'

JayCastro commented 3 years ago
  • removing 'C:/Users/eking/Documents/R/win-library/3.6/montyhall'
  • restoring previous 'C:/Users/eking/Documents/R/win-library/3.6/montyhall' installation of package �C:/Users/eking/AppData/Local/Temp/RtmpYvk1xe/file5d387ccbfdb/montyhall_0.0.0.9000.tar.gz� had non-zero exit statusWarning message: package ‘quanteda’ was built under R version 3.6.3 `

You might just need to update R because apparently you're running a version that's before 3.6.3. R is currently R 4.0.2 . I had messages like that and once I update it, it went away.

ecking commented 3 years ago

Hm it says I am on the latest update of R. I just updated a few days ago. I just ran updates of packages and I still get the following. I'm just at a loss. NAMESPACE file looks fine. :sob:

` installing source* package 'montyhall' ... using staged installation help No man pages found in package 'montyhall' installing help indices building package indices testing if installed package can be loaded from temporary location arch - i386 Error: package or namespace load failed for 'montyhall' in namespaceExport(ns, exports): undefined exports: change_door, create_game, determine_winner, open_goat_door, play_game, play_n_games, select_door Error: loading failed Execution halted *** arch - x64 Error: package or namespace load failed for 'montyhall' in namespaceExport(ns, exports): undefined exports: change_door, create_game, determine_winner, open_goat_door, play_game, play_n_games, select_door Error: loading failed Execution halted ERROR: loading failed for 'i386', 'x64'

lecy commented 3 years ago

@JayCastro I think that would be a great code-through.

Instructions often vary by operating system. And many students are using RMD docs instead of a regular R script.

The package creation packages also change sometimes.

So an example of what works on your machine would be welcome!

It would be helpful to include examples of what NOT to do and why (draw from problems that people are having here - setting working directories, trying to build documentation before completing Roxygen, etc.).

lecy commented 3 years ago

@ecking It looks like you (1) either did not complete the Roxygen documentation first, or did not run the create documents step, and (2) might not have updated your package DESCRIPTION file?

ecking commented 3 years ago

@lecy Thanks. I started over and made some edits to the Description file. Then I ran into an issue where one of the @param values was blank in the documentation. Then I worked through some problems with Github.... It's been a full day of troubleshooting something that was pretty simple to do in the end. lol.

lecy commented 3 years ago

Good trouble-shooting, as in you learned something new? Or just spinning wheels.

It was not supposed to be a complicated assignment. It seems like this class had a lot more issues than the previous one. Suggestions welcome if there is a way to make it more straight-forward!