Displaying 1 result from an estimated 1 matches for "slotfun".
Did you mean:
plotfun
2010 Jan 15
1
Can an object reference itself?
...th different
names)?
I hope the following code snippets will give you an idea what I?m trying to
do:
obj.for.slot <- data.frame(a=1); obj.for.slot <- data.frame(a=100)
save(obj.for.slot, file="C:/obj.1.for.slot.Rdata"); save(obj.for.slot,
file="C:/obj.2.for.slot.Rdata")
slotfun <- function(obj.name)
{
file.fqn.char <- paste("file.fqn <- ", obj.name, "@file.fqn",
sep="")
eval(parse(text=file.fqn.char))
load(file=file.fqn)
return(obj.for.slot)
}
setClass(
Class="Testclass",
representation=representation(
file.fqn=&q...