1

I have created one function Dummyfunc which calculates fold-change for different samples. I am using gsva function inside this Dummyfunc function. I want to access all the arguments of the gsva function from my Dummyfunc so that I can change the values of the arguments as per the need. So far I have tried doing like this :-

Dummyfunc <- function(method="gsva",verbose=TRUE,kernel=){
gsva(method=method,kernel=kernel,verbose=verbose)
}

But can it be done in automated fashion so that all arguments of gsva function can be accessed from Dummyfunc

4

2 に答える 2

1

私があなたの問題を正しく理解していれば、それらをすべて渡す必要があります... 。すべて書き出すことができる可能性がありますが、それには時間がかかる場合があります。

# define the internal function
f.two <- 
    function( y , z ){
        print( y )
        print( z )
    }

# define the external function,
# notice it passes the un-defined contents of ... on to the internal function
f.one <-
    function( x , ... ){
        print( x )

        f.two( ... )

    }

# everything gets executed properly
f.one( x = 1 , y = 2 , z = 3 )      
于 2012-12-13T12:05:36.920 に答える