How to
Something goes wrong...
No space left on device
CLICK ME
An issue of R is the accumulated trash files, which occupy the machine memory therefore crash R. If the size of data your R script deal with is reasonable but R crashes immediately after running and returns the ERROR:
No space left on device
Go to /dev/shm/ and rm <large_trash_file_name>
Find more details through the title link.