0

What is the max file size limit for .r extension file now?

I read that it has 5MB limit, is it still the same? How does that change, will it be different from OS to OS or R version to version.

Reference: RStudio maximum file size reached

I'm very new to R, can someone please help me?

Thanks

Phil
  • 7,287
  • 3
  • 36
  • 66

1 Answers1

3

There is no documented limit for the maximum file size or R code files. In fact, R will be able to deal with anything that’s even remotely reasonable. But for what it’s worth a 5 MiB source code file is not reasonable. If you actually have such files, I strongly suggest removing the large data that’s declared inside it, and moving it to a proper data file instead: separate your code and data. Actual code will never be this big.

As for editing such a file, different code editors have different limits for the size of files they deal well with. Again, having such a big code file is plain unreasonable, so not many code editors bother catering to this use-case, and even though few editors have a hard-coded limit, interactively editing such large files may not work.

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214