R/relocate.R

Defines functions relocate

relocate = function(old, new, obj, ffind=1) {
# do the fffile component
 inst = obj@fffile
 fref = attr(attributes(inst)[["physical"]], "filename")
 ans = gsub(old, new, fref)
 attr(attributes(inst)[["physical"]], "filename") = ans
 obj@fffile = inst
# do the summary component (MAF, RAF) -- still a list but could simplify
 inst = obj@summaryList[[ffind]]
 fref = attr(attributes(inst)[["physical"]], "filename")
 ans = gsub(old, new, fref)
 attr(attributes(inst)[["physical"]], "filename") = ans
 obj@summaryList[[ffind]] = inst
# return
 obj
}

Try the GGtools package in your browser

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

GGtools documentation built on Nov. 8, 2020, 6:32 p.m.