r - Call default constructor of a S4 by class name -
are there more ways call function name below via do.call?
setclass(class = "myclass", representation = representation(name = "character", type = "character" ) ) myclass <- function(...) new("myclass",...) cc<-"myclass" do.call(cc,list())
another way:
cstor <- get(cc) cstor()
Comments
Post a Comment