Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How would you create a new r6 class?



How would you create a new r6 class?..

Answer / Pushpendra Chaturvedi

"Creating an R6 class involves using the R6 package. Here is a simple example of creating and using a new R6 class:
library(R6)
MyClass <- R6Class("my_class",
initialize = function(name) {n self$name <- namen },
print_name = function() {n print(paste("Name:", self$name))n })
my_obj <- MyClass$new(name = "John Doe")
my_obj$print_name()

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More R Programming Interview Questions

Explain how to read data or a matrix from a file?

1 Answers  


What is polynomial in r?

1 Answers  


Give a brief introduction to an array in R?

1 Answers  


What is median in r?

1 Answers  


Explain in brief preliminaries of C/C++?

1 Answers  


What is the of use Matrix package?

1 Answers  


How can you simulate noise model using r?

1 Answers  


What is a random walk model?

1 Answers  


What are debuggers and debugging techniques in R?

1 Answers  


What is t-tests() in R?

1 Answers  


How would you do a cross-product of two tables in r?

1 Answers  


What is the use of apply() in R?

1 Answers  


Categories