powered by
Create a Q7 Type
type(x = function() { }, s3 = "Q7default")
function or expression; becomes the definition of the object
S3 class for the object; necessary when using S3 generic functions
Q7 type; function
# NOT RUN { Adder <- type(function(num1, num2){ add_nums <- function(){ num1 + num2 } }) myAdder <- Adder(1, 2) myAdder$add_nums() # }
Run the code above in your browser using DataLab