# NOT RUN { # create a 2 by 5 matrix x <- matrix(1:10, ncol = 5) fil <- tempfile("data") # the file data contains x, two rows, five cols # 1 3 5 7 9 will form the first row write(t(x), fil) if(interactive()) file.show(fil) unlink(fil) # tidy up # Writing to the "console" 'tab-delimited' # two rows, five cols but the first row is 1 2 3 4 5 write(x, "", sep = "\t") # }
Run the code above in your browser using DataCamp Workspace