Untitled

 avatar
unknown
plain_text
5 months ago
236 B
6
Indexable
R program to read and write files

# Writing to a file

data <- c("This is line 1", "This is line 2", "This is line 3")
writeLines(data, "example.txt")
# Reading from a file
read_data <- readLines("example.txt")
print(read_data)
Editor is loading...
Leave a Comment