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

What is the use of stringr package. Give some examples of the functions in stringr.

1 Answers  


What do you understand by scientific data visualization in R?

1 Answers  


How would you do a left and right join in r?

1 Answers  


What are r packages?

1 Answers  


How will you create scatterplot matrices in r language?

1 Answers  


What is GUI in R?

1 Answers  


What is rmarkdown? What is the use of it?

1 Answers  


What is the difference between library() and require() functions in r language?

1 Answers  


Write a custom function in R?

1 Answers  


Explain about confusion matrix in r?

1 Answers  


What is r vector?

1 Answers  


Why we need data visualization in R?

1 Answers  


Categories