Untitled
Anonymous
plain_text
10/24/2024 5:03 AM
316 B
16
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