R/sourcePartial_linkR.R

Defines functions sourcePartial_linkR

Documented in sourcePartial_linkR

sourcePartial_linkR <- function(fn,startTag='#from here',endTag='#to here') {
  lines <- scan(fn, what=character(), sep="\n", quiet=TRUE)
  st<-grep(startTag,lines)[1]
  en<-grep(endTag,lines)[1]
  tc <- textConnection(lines[(st+1):(en-1)])
  r <- source(tc)
  close(tc)
  r$value
}

Try the linkR package in your browser

Any scripts or data that you put into this service are public.

linkR documentation built on May 2, 2019, 2:14 p.m.