Open kirstenronning opened 3 years ago
Hi @kirstenronning ,
My first instinct is to make sure you restart R and clear the global environment. The second step after that involves inspecting your relative path.
You're currently giving "labs:wk03:utilities.R"
but I would expect the path to look like "labs/wk03/utilities.R"
. The delimiter here needs to be forward slash - /
- rather than a colon. Try revising that and let me know how it goes.
I cleared out my global environment, and resaved the utilities.R file with the forward slash. There seems to be no errors when I run this chunk of code, however when I move to the next one:
for (relevant_file in RELEVANT_FILES) { print(paste0("Starting on ", relevant_file[["year"]])) build_year(fn1 = relevant_file[["fullcount"]], fn2 = relevant_file[["sample"]], year = relevant_file[["year"]]) if (relevant_file[["year"]] < 2010) { print("Finished! Moving onto the next decade.") } else { print("Finished! No more data to parse.") } }
I get an error that Error in file(file, "rt") : cannot open the connection In addition: Warning messages: 1: In file(file, "rt") : 'raw = FALSE' but '/Users/Kirsten/Documents/cpp-528-spr-2021-group-04-v2/data/raw/' is not a regular file 2: In file(file, "rt") :
Then, when I go back to run the first line, I get the same Error message from before:
Error: Cannot assign name to different value in the given environment. Name already in use.
Hi @kirstenronning ,
Do you have the data/
directories? This happened to Meghan yesterday where she didn't realize she needed the data/
and data/raw/
, data/wrangling/
and data/rodeo/
sub-directories. Try making those directories first and then restart and re-run this file.
In my RStudio, I do have data/
, data/raw/
, data/rodeo/
, and data/wrangling/
.
I did not have them last week, so I reopened a new RStudio Project in hopes of having all of the necessary files for this week's lab.
Thank you for the screenshot. I think you are not within your CPP 528 Group Project inside of RStudio which is a dependency in order to use here::here()
.
To get inside of the project, double click on the .Rproj
file located within your cpp-528-spr-2021-group-04-v2
root directory.
Here is what your RStudio should look like after you do click on the .Rproj
file. Note that your project name will look different than mine; however, the file path under "New Folder" should read Home/cpp-528...
rather than Home/Documents/...
I did that, so now my file path reads Home/cpp-528...
and now there aren't any of the sub-directories in my data/
folder. Do I need to manually add them now and start the tutorial over again?
There's a lot of possibilities: entering the project could have moved you out of one branch and into another. You'd have to use GitHub Desktop to confirm.
If you need to just get started on the lab, recreating the folders yourself once more is the best bet.
^however, if there is no data/raw/
, you'd need to manually download the .zip
files and unzip them again. This is where having a teammate who has done these data steps really comes into handy because you can just pull in the changes into main
, create a new feature branch, and all those files will be readily available to you.
I started manually adding the folders to my RStudio, but now my GitHub Desktop is not functioning as I would expect it to. It has 2 changed files on the sidebar, and I do not even know what they are (".DS_Store" and "labs/.DS-Store")? So I think that I am going to manually add the .zip
files into my data/raw
folder, because GitHub Desktop is really confusing me.
That sounds good. Those are Mac files that are artifacts of using Finder. Place .DS_Store in gitignore and you shouldn’t see that anymore.
— Cristian E. Nuno
From: kirstenronning @.> Sent: Tuesday, March 30, 2021 3:35:34 PM To: DS4PS/cpp-528-spr-2021 @.> Cc: Cristian Ernesto Nuno @.>; Comment @.> Subject: Re: [DS4PS/cpp-528-spr-2021] Lab 03 - Lab Tutorial Data Steps, here::here() (#26)
I started manually adding the folders to my RStudio, but now my GitHub Desktop is not functioning as I would expect it to. It has 2 changed files on the sidebar, and I do not even know what they are (".DS_Store" and "labs/.DS-Store")? So I think that I am going to manually add the .zip files into my data/raw folder, because GitHub Desktop is really confusing me.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/DS4PS/cpp-528-spr-2021/issues/26#issuecomment-810623383, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFZB2S5UYPCMQJKSRQ3VBX3TGJG3NANCNFSM42C3EQUA.
Are there instructions for pulling the changes into main
and getting the files onto my RStudio from the GitHub Desktop?
I see the files are already added to data/raw
on the main branch on GitHub Desktop, but I am unsure how to get them to my RStudio. I apologize if this was something that has already been covered. I feel comfortable pushing changes, but I do not know how to pull into RStudio.
Yes this is covered in the week 02 lecture and tutorial: GitHub feature branch workflow
— Cristian E. Nuno
From: kirstenronning @.> Sent: Tuesday, March 30, 2021 3:56:55 PM To: DS4PS/cpp-528-spr-2021 @.> Cc: Cristian Ernesto Nuno @.>; Comment @.> Subject: Re: [DS4PS/cpp-528-spr-2021] Lab 03 - Lab Tutorial Data Steps, here::here() (#26)
Are there instructions for pulling the changes into main and getting the files onto my RStudio from the GitHub Desktop? I see the files are already added to data/raw on the main branch on GitHub Desktop, but I am unsure how to get them to my RStudio. I apologize if this was something that has already been covered. I feel comfortable pushing changes, but I do not know how to pull into RStudio.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/DS4PS/cpp-528-spr-2021/issues/26#issuecomment-810631881, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFZB2S3WL4L5L62YEHWNVZDTGJJLPANCNFSM42C3EQUA.
I just rewatched both the Lecture and Tutorial videos, and I am not seeing explicit instructions for getting Remote Main to match Local Main in RStudio. All I saw was pressing the "Fetch Origin" button, which does not seem to affect my RStudio in any way when I press it.
Glad you watched them! The explicit instructions are in the videos and are also documented in this document. See steps 20-23 on page 10.
RStudio is sometimes delayed when you act outside of it (i.e. whenever you use GitHub Desktop). If you're confident you've pulled in the latest changes into the main
branch, close RStudio, reopen it, re-enter the Project, and you should now see the data files.
...I am not seeing explicit instructions for getting Remote Main to match Local Main in RStudio. All I saw was pressing the "Fetch Origin" button, which does not seem to affect my RStudio in any way when I press it.
The order of operations here is that remote main
is usually farther along in its history than local main
. You're trying to get local main
to match remote main
: a small distinction but an important one to keep in mind.
That's why we click "Fetch Origin": to tell our local instance of the repo to collect the commits that have occurred since the last time main
was updated. It's highly likely that your teammates have submitted a pull request that has changed remote main
.
Once you click on that button, you should be prompted to "Pull Origin": this means pull in all the commits from remote main
into my local version of main
. You now you're fully up to date when the latest commit within the "Changes" tab on GitHub Desktop matches what you are seeing on your group's repo.
Hello, I am working on the Lab Tutorial, Data Steps section. I successfully saved the utilities.R and it seems to be running. However, I am running into issues on the project_data_steps.R file.
I have the following code: `import::here("build_year", "RELEVANT_FILES", "obtain_crosswalk", "create_final_metadata_file",
notice the use of here::here() that points to the .R file
When I run it, I am receiving this message:
Error: Cannot assign name to different value in the given environment. Name already in use.