RStudio maximum file size reached

心已入冬 提交于 2021-01-27 23:52:54

问题


I have downloaded RStudio and in opening a file where my code resides it seems I have reached a capacity constraint:

The file is 2.3MB the maximum file size is 2MB
The file is too large to open at the source

Is there any way around this besides reducing the size of the file or slicing the file in two or similar?


回答1:


The answer is very likely no, you cannot do this. I refer you to this question on the RStudio support forum, where they suggest that the editor is not capable of handling such files:

Is your file much larger than 5MB? The limit is there for your protection--for both the editor component which is not infinitely scaleable, and also when resuming your session you may appear to hang.

I fully agree with the comments: it is doubtful that properly written code could reach this size. I suspect that what you have done is simply copied hundreds of lines of codes hundreds of times rather than iterating through it.

If you really need to do this, you can use Notepad++, NpptoR, and plain R which is a reasonable combination to work with enormous code files.




回答2:


If the above error comes when trying to load a large script file. There is a work around for this.

  1. Create a temporary script file say, temp_script.r, with small content. Does not matter what content it is, maybe couple of lines from the original script files.

  2. Open temp_script.r in R Studio

  3. In another text editor say Notepad, open the same file i.e temp_script.r

  4. Copy and Paste the original large script file into temp_script.r in Notepad.

  5. Save temp_script.r in Notepad.

  6. The opened temp_script.r in RStudio with be auto refreshed and now you will see the large codes have been loaded into RStudio's editor.

Good Luck.



来源:https://stackoverflow.com/questions/21783838/rstudio-maximum-file-size-reached

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!