Watts-College / cpp-527-fall-2021

A course shell for CPP 527 Foundations of Data Science II
https://watts-college.github.io/cpp-527-fall-2021/
2 stars 6 forks source link

Final Project - R Studio Frozen #84

Open ctmccull opened 2 years ago

ctmccull commented 2 years ago

So after creating and successfully running part II of the final project, RStudio has frozen and will not let me click on anything. I've tried force quitting and it won't close. Any advice?

ctmccull commented 2 years ago

Update: I used task manager and am going to wait a little before reopening. I'll message again if there's still issues.

lecy commented 2 years ago

My advice generally: drink 5 glasses of water a day and buy property in the Faroe Islands.

Is the program running, or is it just frozen?

If it's running, is it stuck in a loop or just taking awhile to process (it takes a couple minutes for my machine to build the report but I also have 64G of RAM).

If frozen, I would check the folder for extra files with the same name as the RMD. Sometimes they get corrupted if you force the program to close and they can hang R Studio when it tries to open again.

ctmccull commented 2 years ago

I'm not sure. It happened after I ran the loop, but it looked like it had finished. I wonder if it's still stuck in the loop.

lecy commented 2 years ago

Is your project in a dropbox folder? Sometimes dropbox will lock new files as it is syncing them, and this can muddle the knit steps (knitting creates an intermediary .md file, then deletes it, and might also create some images or other HTML assets).

I've run into problems when using caching as well. But we didn't add that to chunks here.

ctmccull commented 2 years ago

No, but I do have OneDrive. That could be what's happening.

ctmccull commented 2 years ago

I paused OneDrive syncing and tried opening RStudio again and it still froze.

When I ran the loop it said that it couldn't find t.rank, so I changed it to d and that worked, but I'm wondering if that caused anything?

I can't post code, but I can do a screenshot. image

ctmccull commented 2 years ago

I’m about to board a plane from DC back to Arizona, so I’ll keep trying when I arrive. (Luckily, I’m gaining 3 hours haha!) If all else fails, I’ll just submit what I have.

lecy commented 2 years ago

You filter by units to create d2, but then keep using d in the functions below.

Not sure that would cause the error, but will definitely change the results.

don't want to print all of d in the second line from the bottom. You should be printing the tables you create above.

AmyTrumpower commented 2 years ago

I might be butting in here. but I was having the same issue and when I looked in my folder the HTML file was huge. Not sure why but I had to:

  1. force close RStudio via the Task Manager
  2. move the RMD file so when I re opened RStudio it would not try and continue the task that caused the issue
  3. deleted the HTML (old knitted) file
  4. re opened RStudio- and since I moved the offending RMD it didn't try and continue what caused the issue
  5. cleared the Workspace (Session-Clear Workspace)
  6. reopened the RMD file- and fixed the issue with the code

If I just closed RStudio and re opened without moving the file it would continue to freeze RStudio so I couldn't clear the workspace or fix the code.

Don't know if that will help you or not.

lecy commented 2 years ago

No, that's helpful - thanks @AmyTrumpower !

ctmccull commented 2 years ago

@AmyTrumpower Thank you so much, Amy! That is incredibly helpful. I’ve been thinking about ideas of what to do once I get off this plane if it’s still frozen. I will try that first! You might just be my saving grace today!

AmyTrumpower commented 2 years ago

@ctmccull - I forgot that I had to rename the file so that RStudio can't find it. I renamed it by right-clicking on the actual file and added a "1" to the end of the name. Then once it's fixed I renamed it back to the proper name.

I just had it happen again and realized I forgot that step. I did it between steps 3&4 above.

Good luck!