Open lindaalvarez opened 3 weeks ago
Note /Users/...
vs /users/...
You might try it without the C:
as well?
I went ahead and tried both and no luck.
so i tried to double check that my pathway exists and I keep getting false. @castower
Here is some code to help you identify your current location (default working directory), navigate to other directories, create folders, and check which files and folders exist within each folder.
######################################
###################################### CURRENT FOLDER
######################################
getwd()
[1] "C:/Users/lecy/Documents"
dir() # LIST FILES IN DIRECTORY
# [1] "AWS"
# [2] "AWS-NCCS-EFILE.csv"
# [3] "bmf"
# [4] "2023-05-POL-ORGS-SCHED-A.csv"
# [5] "2023-05-POL-ORGS-SCHED-B.csv"
# [6] "2023-05-POL-ORGS-SCHED-D.csv"
######################################
###################################### BASIC NAVIGATION
######################################
# NOTE DIFFERENCE BETWEEEN FOLDERS AND FILES
setwd( "AWS-NCCS-EFILE.csv" ) # FILES HAVE EXTENSIONS
# > Error in setwd( "AWS-NCCS-EFILE.csv" ) : cannot change working directory
setwd( "AWS" ) # FOLDERS DO NOT
getwd()
# [1] "C:/Users/lecy/Documents/AWS"
setwd( ".." ) # RETURN TO PARENT FOLDER
getwd()
# [1] "C:/Users/lecy/Documents"
setwd( "bmf" )
getwd()
# [1] "C:/Users/lecy/Documents/bmf"
dir()
# [1] "BMF-2022-01-501CX-NONPROFIT-PX.csv" "BMF-2022-08-501CX-NONPROFIT-PX.csv"
# [3] "BMF-LABELED-TEMP.rds" "BMF_TAX_EXEMPT_PURP.csv"
# [5] "BMF_UNIFIED_V1.1.csv" "BMF_UNIFIED_V1.2.csv"
######################################
###################################### CREATE NEW FOLDERS
######################################
dir()
# [1] "BMF-2022-01-501CX-NONPROFIT-PX.csv" "BMF-2022-08-501CX-NONPROFIT-PX.csv"
# [3] "BMF-LABELED-TEMP.rds" "BMF_TAX_EXEMPT_PURP.csv"
# [5] "BMF_UNIFIED_V1.1.csv" "BMF_UNIFIED_V1.2.csv"
setwd( "TEST" )
# > Error in setwd( "TEST" ) : cannot change working directory
dir.create( "TEST" )
dir()
# [1] "BMF-2022-01-501CX-NONPROFIT-PX.csv" "BMF-2022-08-501CX-NONPROFIT-PX.csv"
# [3] "BMF-LABELED-TEMP.rds" "BMF_TAX_EXEMPT_PURP.csv"
# [5] "BMF_UNIFIED_V1.1.csv" "BMF_UNIFIED_V1.2.csv"
# [7] "TEST"
setwd( "TEST" )
getwd()
# [1] "C:/Users/lecy/Documents/bmf/TEST"
dir() # EMPTY FOLDER
# character(0)
######################################
###################################### RELATIVE NAVIGATION
######################################
getwd()
# [1] "C:/Users/lecy/Documents/bmf/TEST"
setwd( "../.." ) # GO UP TWO LEVELS
getwd()
# [1] "C:/Users/lecy/Documents"
setwd( "bmf/TEST" ) # GO DOWN TWO LEVELS (FOLDER IN A FOLDER)
getwd()
# [1] "C:/Users/lecy/Documents/bmf/TEST"
@castower I was able to move forward and now am in the part where I am trying to finish the R file with documenting the instructions. When I use the devtools::document() command I get a series of errors.
devtools::document() ℹ Updating montyhall documentation ℹ Loading montyhall Writing 'create_game.Rd' Warning message: ── Conflicts ─────────────────────────────────────────────────────────────────── montyhall conflicts ── ✖
change_door
masksmontyhall::change_door()
. ✖create_game
masksmontyhall::create_game()
. ✖open_goat_door
masksmontyhall::open_goat_door()
. ✖select_door
masksmontyhall::select_door()
. ℹ Did you accidentally source a file rather than usingload_all()
? Runrm(list = c("change_door", "create_game", "open_goat_door", "select_door"))
to remove the conflicts. Not quite sure how to move forward from this, I'm afraid that if I remove these words it will mess up the code of the game.
Hello @lindaalvarez ,
A couple of things to check:
I believe I have the file in the correct folder, I followed the instructions. I retraced my steps and started over but I did notice that whenever I run the devtools::document() command a new folder gets created with all of the error terms created. I don't know what to do there. @castower
Everything was working up until I started editing the r script to fill the instructions, after I filled them in is when I got those errors and that random folder.
@lindaalvarez
The output of getwd()
before you run devtools::document()
indicates that you're inside of the R subfolder of montyhall.
You'll need to change the directory to go up one folder level to the montyhall folder and then run the devtools::document()
code.
@lindaalvarez
You may have lingering files from the previous attempt at running document().
I would suggest deleting those files and then trying again.
Thank you so much for your help!
You're welcome @lindaalvarez! Were you able to resolve your installation errors?
@lindaalvarez ,
Your repo name is MontyHall3Doors vs MontyHall so you'll need to update the package name to install.
@castower As soon as I sent the message I saw the error, my apologies! I am currently waiting for the downloading the finish and hopefully finally be done!
Great @lindaalvarez !
@castower I think I made an error when waiting for it to upload, not sure how to go from here
I actually fixed the code and it is now running again @castower I've just been waiting for about 10 minutes for it to finish loading, I hope that is to be expected
Hello, I am unfortunately getting stuck when trying to set my working directory for the monty-hall-pkg. I've tried a couple different ways such as creating a folder as well as having the pkg in my downloads but I keep getting an error that I cannot change my wd. @castower