search for: cls1

Displaying 2 results from an estimated 2 matches for "cls1".

Did you mean: cls
2006 Apr 14
3
The object argument of NextMethod.
My question is when the object argument of NexthMethod be used? In the following example, weather object argument is used will not affects the result. ### foo=function(x) {UseMethod("foo")} foo.cls1=function(x) { x=x+1;class(x)<-"ncls" NextMethod() } foo.ncls=function(x) { cat("ncls\n") } foo.cls2=function(x) { cat("cls2\n");print(x) } a=1;class(a)=c("cls1","cls2") > foo(a) cls2 [1] 2 attr(,"class") [1] "ncls"...
2013 Sep 06
1
directives to explicitely exclude objects from import into namespaces
...t step notimportFrom(<pkg>, <obj1>, <obj2>,....) ## exclude <obj1>, <obj2>, ... again from the previous namespace import ## and, similarly, notimportMethodsFrom(<pkg>, <meth1>, <meth2>,....) notimportClassesFrom(<pkg>, <cls1>, <cls2>,....) in the NAMESPACE file? Otherwise the list of object, methods, classes to be explicitely imported (in my case) got very long (and hence hard to maintain) -- much longer than the list of items to be excluded from an import. Or have I overseen some obvious, easier way to ach...