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

11 lines
240 B
R
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
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")