Open AprilPeck opened 3 years ago
Just sharing since I was online with April, but this little snippet helped after lots of googling!! retry devtools::install_github("your name/montyhall") after running the code below.
Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS=TRUE)
April - I was able to install your package from GitHub without an issue.
It might be as @scribenaz suggests - perhaps a system setting?
What are your system settings? Type Sys.info()
and paste the results.
> devtools::install_github( "AprilPeck/montyhall" )
Downloading GitHub repo AprilPeck/montyhall@HEAD
√ checking for file 'C:\Users\jdlec\AppData\Local\Temp\RtmpqgEz6j\remotes44345e283e25\AprilPeck-montyhall-0cf03bc/DESCRIPTION'
- preparing 'montyhall':
checking DESCRIPTION meta-information ...
checking DESCRIPTION meta-information ...
√ checking DESCRIPTION meta-information
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'montyhall_0.0.0.9000.tar.gz'
Installing package into ‘C:/Users/jdlec/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package 'montyhall' ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'montyhall'
finding HTML links ... done
change_door html
create_game html
determine_winner html
open_goat_door html
play_game html
play_n_games html
select_door html
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (montyhall)
> library( montyhall )
Loading required package: dplyr
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
> create_game()
[1] "goat" "goat" "car"
Thank you both for your help! Here is my system info:
Sys.info() sysname release version nodename machine "Windows" "10 x64" "build 18363" "SCHOOLLAPTOP" "x86-64" login user effective_user "apesm" "apesm" "apesm"
Good news is I can run your package, so you are fine for the assignment.
When you built the package you probably installed it on your local machine. Try uninstalling it before doing a new install via GitHub. Sometimes your operating system settings or an anti-virus program try to prevent programs from making changes to installed software, so they might block the step of deleting the old version of the package when installing the new version from GitHub. You can uninstall it with the R command, or if that fails just go into your R library (usually located in your Documents folder) and delete the entire montyhall folder.
remove.packages( "montyhall" )
If that doesn't work, can you shut down R, open back up, and try the solution by @scribenaz?
It might also occur if you have not commented code correctly in the R scripts file, it appears:
https://stackoverflow.com/questions/32122780/lazy-loading-error-in-r-package
But that would not explain why I can install your package on my machine but you cannot on yours.
I have created the package and installed it and everything worked fine. But when I upload it to github, I get this whenever I try to install it. I've deleted the repository from github twice and recreated it.
checking for file 'C:\Users\apesm\AppData\Local\Temp\RtmpoNPb5w\remotes692c8ca43ec\AprilPeck-montyhall-cc7061f/DESCRIPTION' ...
√ checking for file 'C:\Users\apesm\AppData\Local\Temp\RtmpoNPb5w\remotes692c8ca43ec\AprilPeck-montyhall-cc7061f/DESCRIPTION'
preparing 'montyhall': checking DESCRIPTION meta-information ...
checking DESCRIPTION meta-information ...
√ checking DESCRIPTION meta-information
checking for LF line-endings in source and make files and shell scripts
checking for empty or unneeded directories
building 'montyhall_0.0.0.9000.tar.gz'
Installing package into ‘C:/Users/apesm/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified)