Open krbrick opened 3 years ago
Are you trying to knit the instructions in R Studio?
You should be running the instructions in an R script. This is the extend of what you would need to run:
# set your working directory
# if you don't want to create
# the package in your default
# working directory
getwd() # default directory, usually my documents
library(devtools)
# step 1
usethis::create_package( "montyhall" )
# step 2 move R script to montyhall/R folder
# after completing documentation fields
# step 3
setwd( "montyhall" )
devtools::document()
# step 4
setwd( ".." )
devtools::install( "montyhall" )
library( montyhall )
create_game()
# step 5: close R and re-open new console
devtools::install_github( "yourGitHubName/montyhall" )
my create_game check worked, but when I got to this stage, I got a big red one that looks like it has something to do with my wd. System command 'R' failed, exit status: 1, stdout & stderr were printed published to GitHub successfully.
Running /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL \ /var/folders/fm/dkr394jj6w97jggg2035jf1r0000gn/T//RtmpFUJL5x/montyhall_0.0.0.9000.tar.gz \ --install-tests
restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/montyhall’ Error in (function (command = NULL, args = character(), error_on_status = TRUE, : System command 'R' failed, exit status: 1, stdout & stderr were printed Type .Last.error.trace to see where the error occured
Stack trace:
x System command 'R' failed, exit status: 1, stdout & stderr were printed