I am new to R programming and had a requirement to create a zero byte/tag/touch file on Unix server using R.
Is it possible to create a file on Unix using R?
You can create an empty data frame and write that to disk:
x <- data.frame()
write.table(x, file='empty', col.names=FALSE)
Result:
-rw-rw-r--. 1 matt matt 0 May 28 20:29 empty
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With