RosettaCodeData/Task/Create-a-file/R/create-a-file.r

11 lines
240 B
R

f <- file("output.txt", "w")
close(f)
# it may fails and the exact syntax to achieve the root
# changes according to the operating system
f <- file("/output.txt", "w")
close(f)
success <- dir.create("docs")
success <- dir.create("/docs")