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

RStudio Concerns #76

Open aawoods97 opened 2 years ago

aawoods97 commented 2 years ago

Hello,

I've been having trouble with RStudio opening my file over the past two days so I updated R and R Studio. I am now receiving two problems:

  1. I am receiving a notice to update rmarkdown, but it is not listed as one of the packages available for update. How can I update the package regardless?
  2. RStudio is freezing when working on my final project file. It has frozen after opening the file and before updating or running anything in the field. It is also currently frozen while attempting to run a code chunk. Two days ago it ran the entire file with no problem. Yesterday I couldn't edit nor run anything at all. Today after updating everything, I can edit and run the file until it freezes and I have to restart RStudio. Is there any solution for this? Or should I continue the rest of my typing in R?

Thank you in advance!

lecy commented 2 years ago
  1. I would close R Studio, open R, and install rmarkdown there.

  2. If a file is freezing it could be one of two things. You added code that can't be run - an infinite loop that never quits, a dataset that is too large to load, some calculation that gets stuck.

Or your file got froze during a knit and there are "ghosts in the machine" - corrupted objects or files that R Studio is trying to load as it loads files from the previous session.

Try clearing out the R environment - under Session >> Clear Workspace.

Check to see if there are extra files or folders in the directory that have the same name as your RMD file - those were created during a knit and might be corrupted. If you are using cached files they can sometimes get hung up as well.

aawoods97 commented 2 years ago

Thank you! I believe it is working now!

lecy commented 2 years ago

What worked?

aawoods97 commented 2 years ago

Actually, I think I spoke too soon. I was able to install rmarkdown. I did delete the files of the same name and cleared the workspace. However, my Rstudio is running relatively slower after updating it. (I did read an article that mentioned RStudio has been running slower on Mac computers with new software).

I have been encountering problems with my unique function, as listed below. The function runs, but it times out before finishing parsing the column. However, I am not very confident that my code is correct. Could you point me in the correct direction?

`unique <-function(first){

first %>% pander() first %>% unique() table( first ) %>% sort() }`

lecy commented 2 years ago

Mac problems sound like money problems. I can't help you there :-)

The unique() function is a core R function.

x <- c("aaron","aaron","shriti","shriti","muhamed")
unique(x)
[1] "aaron"   "shriti"  "muhamed"
aawoods97 commented 2 years ago

Haha! I appreciate your humor. Thank you!! I have been having the hardest time with trying to determine how to write it!