[R] stop further sourcing of an R file
Gabor Grothendieck
ggrothendieck at myway.com
Fri Nov 14 00:02:32 CET 2003
This will source lines up but not including the first line with
exit in it:
z <- readLines("myfile.r")
z <- textConnection(z[seq(grep("exit",z)[[1]]-1)])
source(z)
close(z)
---
Date: Thu, 13 Nov 2003 13:52:16 -0700 (MST)
From: U.Ramakrishna <ramakrsn at CS.ColoState.EDU>
To: <r-help at stat.math.ethz.ch>
Subject: [R] stop further sourcing of an R file
Hello,
Thanks to people who responded to previous mail!
Is there a way in which we can stop further sourcing
of an R file? i.e., i am sourcing an R file and keep
an equivalent of 'exit' in it and run the code till that point?
Thanks again
Regards
Ramakrishna
More information about the R-help
mailing list