Displaying 1 result from an estimated 1 matches for "p2name".
Did you mean:
p1name
2010 Sep 15
1
retrieving object names passed indirectly to a function
...ble$replicates[i]) {
# somehow retrieve objects named in cols p1 and p2 and
# pass them to foo with their original names
# (e.g. some clever use of get and assign ?)
}
}
}
foo <- function(p1, p2) {
# retrieve and store arg names
p1name <- deparse(substitute(p1))
p2name <- deparse(substitute(p2))
# run simulation with values of p1 and p2 then
# store results together with names of objects
# passed as args to output database
}
My actual simulation function involves a large number of arguments of
various classes and if at all possible I prefer to avoid ha...