search for: genformals

Displaying 6 results from an estimated 6 matches for "genformals".

Did you mean: denormals
2015 Jan 29
3
[Q] Get formal arguments of my implemented S4 method
...does not have nonstandard arguments. We should probably add a version of this function for 3.3.0, so user code doesn't have hacks around the current hack. methodFormals <- function(f, signature = character()) { fdef <- getGeneric(f) method <- selectMethod(fdef, signature) genFormals <- base::formals(fdef) b <- body(method) if(is(b, "{") && is(b[[2]], "<-") && identical(b[[2]][[2]], as.name(".local"))) { local <- eval(b[[2]][[3]]) if(is.function(local)) return(formals(local)) w...
2015 Jan 29
2
[Q] Get formal arguments of my implemented S4 method
...ly add a version of this function for 3.3.0, so > user code doesn't have hacks around the current hack. > > > > methodFormals <- function(f, signature = character()) { > > fdef <- getGeneric(f) > > method <- selectMethod(fdef, signature) > > genFormals <- base::formals(fdef) > > b <- body(method) > > if(is(b, "{") && is(b[[2]], "<-") && identical(b[[2]][[2]], as.name(".local"))) > { > > local <- eval(b[[2]][[3]]) > > if(is.function(local))...
2015 Jan 29
1
[Q] Get formal arguments of my implemented S4 method
...function for 3.3.0, so > user code doesn't have hacks around the current hack. > > > > > > methodFormals <- function(f, signature = character()) { > > > fdef <- getGeneric(f) > > > method <- selectMethod(fdef, signature) > > > genFormals <- base::formals(fdef) > > > b <- body(method) > > > if(is(b, "{") && is(b[[2]], "<-") && identical(b[[2]][[2]], > as.name(".local"))) { > > > local <- eval(b[[2]][[3]]) > > > if...
2015 Jan 29
0
[Q] Get formal arguments of my implemented S4 method
...d arguments. We should probably add a version of this function for 3.3.0, so user code doesn't have hacks around the current hack. > > methodFormals <- function(f, signature = character()) { > fdef <- getGeneric(f) > method <- selectMethod(fdef, signature) > genFormals <- base::formals(fdef) > b <- body(method) > if(is(b, "{") && is(b[[2]], "<-") && identical(b[[2]][[2]], as.name(".local"))) { > local <- eval(b[[2]][[3]]) > if(is.function(local)) > return(...
2015 Jan 29
0
[Q] Get formal arguments of my implemented S4 method
...robably add a version of this function for 3.3.0, so user code doesn't have hacks around the current hack. > > > > methodFormals <- function(f, signature = character()) { > > fdef <- getGeneric(f) > > method <- selectMethod(fdef, signature) > > genFormals <- base::formals(fdef) > > b <- body(method) > > if(is(b, "{") && is(b[[2]], "<-") && identical(b[[2]][[2]], as.name(".local"))) { > > local <- eval(b[[2]][[3]]) > > if(is.function(local)) >...
2015 Jan 28
2
[Q] Get formal arguments of my implemented S4 method
I'm attempting to reflect the information for use with corresponding fields in GUI (in a different package), to provide default values, argname as key for UI label lookups, etc. So I want something much more like the formals of the implementation: { "object", "method": c("median", "vs", "tukey"),