search for: create_new_instance

Displaying 1 result from an estimated 1 matches for "create_new_instance".

2011 May 06
1
Create and access several instances of a C++ class from R
...problem): // C++ side: class Foo{ ... } // perhaps: void my_new_instance_wrapper("the_character") // plain to see that I am no C++ programmer ;-) { static Foo "the_character"; // no return needed since we know the name of the instance = "the_character" } # R side: create_new_instance <- function(name){ dono_what_to_use_here(???, class) } # perhaps: create_new_instance <- function(name){ .C("my_new_instance_wrapper", as.character(name)) } dyn.load("Foo") obj1 <- create_new_instance("bar", class="Foo") obj2 <- create_new_in...