I am trying to use function A within function B. I want to fix the attributes of function A dependent on the input from function B. As a simple example:
somfun<-function(x,atra){
functionA(x,atra$subset)
}
Sorry if it is vague. But I need atra
to operate as the arguments like paste(x,sep='sss')
etc. but with an arbitrary number of arguments. `atra would be a named vector for example or whatever was appropriate.
example
atra<-list(a=1:2,b=3:4,c=5:6,1:2,sep='')
x<-'data'
somfun<-function(x,atra){
c(atra[[1]],atra[[2]],atra[[3]],paste(x,atra[[5]]))
}
but i want all the names to preserve and paste to realise that atra[[5]]
is saying sep=''