Constant R session restarting, error reading csv files even after uploading files

I am uploading the Coursera project files. But I am not to able to read_csv files. Once I could but then the R Session restarted and again same problem. What could be the issue. I literally lost 1 day solving the same issue. Can anyone please help me guide here. Do I need to update for something. I even tried to update R, even that showed unable to locate your file. So do I need to delete everything and then redownload or what I need to do.

There are multiple reasons. I hope someone else with reply with general tech support. I would like to rule out the common issues that have occurred this pass month.

  • What operating system do you have? Is it Windows 11? If you have window 10 are you using onedrive application?
  • What version of R do you have? Is it 4.1.0? 4.0.0? Is it 4.2.2 (the latest)? Generally 4.2.1 and 4.1.1 (due to internet.c oddity) are stable releases. All 4.0 version and 4.1 version of R have a bug in internet.c file.
  • What version of Rstudio are you using?
  • What packages are you using for Coursera project? Are you using purr, prophet, rlang, vctrs, dplyr?

Generally a reinstall of R and Rstudio should help.

If this is a course @ your professor with this message so he knows that there have been other users experience issues with R (and Rstudio) these last 2 months.

I am using Mac book 13, intel version 10.15 updated. I also noted now my R programme is unable to locate my default locale.

trying URL ''
Content type 'application/x-gzip' length 420896 bytes (411 KB)

downloaded 411 KB

tar: Failed to set default locale

I installed Tidyverse, ggplot2, skim, janitor,dplyr.

I noticed whenever I try to download dplyr the R session restarts which also happened with the trainer in the course video I noticed.

I know I need some technical support which I am trying to find here as I am non-tech person :frowning:

I am a Dentist

Can you give me your specific operating system on MacBook?

I would like to check to see if you have one of the last 3 version of MacOS installed. You might have to upgrade the Mac to support Rstudio and R. To help you out, I am going to @ the last person who dealt with Mac problems. See for example this error.

Also your other error has to do with utf-8 settings under global options.
P.S. That restart is probably because he reinstalling dplyr and tidyverse twice.

1 Like

To whom I am about to @ for Mac Tech support, below is system log that Deepti share with me.

  • I can debug part of the utf-8 part, but I need to know ... where can I find Yihui Xie blog and github? They have great documentation about this that explains the utf-8 issue in non-technical terms.
  • If the patch I am about to suggest fails then how can a Mac User get the system log for when Rstudio/R crashes similar to the the post does here? Rstudio is not working on my MacoS - #2 by technocrat ?

@Deepti_Prasad so the mac direction say this right here:

Try system("defaults write org.R-project.R force.LANG en_US.UTF-8") in your R console you have open

Also this user had a similar issue: Installation- non-UTF8 locale MacBook

R and the R.APP GUI support for internationalization. Among other things this means that messages and GUI elements can be translated into various languages. R.APP automatically detects the user’s settings in the Language & Region section of the System Preferences and uses that information to offer translated messages and GUI if available.

If you use a non-standard setup (e.g. different language than formats), you can override the auto-detection performed by setting ‘force.LANG’ defaults setting, such as for example

defaults write org.R-project.R force.LANG en_US.UTF-8

when run in Terminal it will enforce US-english setting regardless of the system setting. If you don’t know what Terminal is you can use this R command instead:

system("defaults write org.R-project.R force.LANG en_US.UTF-8")

but do not forget to quit R and start R.APP again afterwards. Please note that you must always use ‘.UTF-8’ version of the locale, otherwise R.APP will not work properly.

By default R.APP uses UTF-8 for newly created documents and for the console. When opening new documents R.APP assumes UTF-8 and only if the document violates UTF-8 rules, it will try to fallback to legacy encoding, usually Mac Roman.

If you are interested in translating R.APP GUI into other languages, please read the developer documentation at Translating R Messages, R >= 3.0.0.

Summoning @technocrat


What information do you need to debug further if the above solution does not work?

You have posted on the #posit-cloud category so I would assume you are using an RStudio session on Posit Cloud but then you show installation logs that suggest you are using a desktop version of RStudio installed in your system, can you please clarify?

A common reason for an R session breaking while reading csv files is the lack of sufficient RAM. This could be very much the case if you are using a free Posit Cloud plan since it is limited to just 1GB of RAM.

1 Like

it was my mistake I using RStudio on posit cloud. I corrected the issue by installing RStudio. Thank you Andre:)


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.