I'd like to be able to create new files with some information already filled
in. Essentially the contents would be
(The first line contains CVS keywords.)
My first idea was to create the text string, either with R (or maybe a DOS
batch script), then somehow persuade Tinn-R to open a new file with the
contents. Step 1 is fine, but I have no clue how to do step 2.
Here's the R code:
get_user_name <- function()
env <- if(.Platform$OS.type == "windows") "UserName" else "USER"
now <- Sys.time()
text <- paste("# $Author:", get_user_name(), "$ $Date: ", now,
"$ $Revision 0.1 $\n# Copyright: MyCompany", strftime(now, "%Y"))
Does anyone have any ideas on how to proceed, please?
Give a looked on Tools/Database/Completion!
It is very easy to use and will help you troubleshoot this problem and others
@jcfaria: Thanks, that is a very useful tool; I hadn't discovered it before.
So far I have used it to get Tinn-R to add a standard block of text to my
files. What would be even better would be if I could get it to evaluate some
of the statements, so that for instance, it would insert the current date. Is
this possible, or does the completion only allow for static text?
For while, it is only for static text!
Log in to post a comment.