I have a R function which can generate the LaTeX code (the output is the LaTex code) by using cat(), while now I want to save these LaTeX code, but I don’t know which function can save these LaTeX code…
I have a R function which can generate the LaTeX code (the output is
Share
I like to use the
sink()function:Edit: Obviously, you can choose the file path where the file will be saved by changing the sink argument such as:
sink(file='c:/Users/Eva/Desktop/ols.txt'), orsink(file='~/ols.txt')