CSV dateimport is not available on RStudio

Asked 2 years ago, Updated 2 years ago, 79 views

If you try to dateimorort with csv, the following dialog appears:

Enter a description of the image here

If you select yes here, the following message appears in the console:

Error in
file(con, "r"): enable to translate'C:/Users/Yoi eunuch/Qi-ga, 夜Shanga>8c>/OneDrive/ ··87> &·繝· &· 87· 97· 現晏· 」郢 c· : / to· : gable·T ·f郢" C·97>/R/tfrfwork(version1.cv- 8T-UvF

I would appreciate it if you could tell me how I can capture the data.It will be the same for all CSVs.

r csv rstudio

2022-09-30 19:51

2 Answers

If you select yes here, the following message appears in the console:

I don't think you'll get this message just by selecting yes. If possible, I think it's an error when you try to load it into Data Import. Assuming that you're using the latest version of RStudio (1.4.1106) at this time, I'll answer.

This is probably a bug in RStudio that occurs when the file path contains non-English characters and cannot be resolved at this time. You can read CSVs without errors by entering the file path directly without using Data Import.

Sys.setlocale ("LC_ALL", 'Japanese_Japan.932')
library(readr)
data<-read_csv("C:/Users/<Your Username>/OneDrive/<Further file path>")

If you use the Tab key, you'll find candidates for folders/filename, so I don't think it's too difficult.

If you change the locale to English, you can avoid this error, but I don't recommend it because there are too many side effects.


2022-09-30 19:51

Using RStudio properly on Japanese version of Windows is quite hell, so
I strongly recommend using the containerized web app using Docker.

How do I use it after installing Docker for Windows?
It's very easy to just run the following command:

 docker run-e PASSWORD=yourpassword --rm-p8787:8787 rocker/tidyverse

Once done, go to http://localhost:8787/ on Google Chrome and so on.

This method includes parallel libraries using fork(), which do not usually run on Windows.
It also has the advantage of being able to use it the same way as the unix version.
There will be almost no environmental problems, so please give it a try.


2022-09-30 19:51

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.