tf <- tempfile()
writeLines(rownames(mtcars), tf)
# Trying to use connections throws an error
con <- file(tf)
try(writeLines(con))
close(con)
# Trying to use unsupported args throws a warning
writeLines(rownames(mtcars), tf, useBytes = TRUE)
unlink(tf)
Run the code above in your browser using DataLab