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 to construct new s4 class?



How to construct new s4 class?..

Answer / Ravindra Singh

To create a new S4 class in R, you need to define a class definition with `setClass()`, and methods for each generic function that should work for your class: `setClass("myS4Class", contains = list(myAttribute = "character"), representation = representation(myAttribute = "character"))`. You can then create objects of this class using `new("myS4Class", myAttribute = "value")`.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More R Programming Interview Questions

What are the data types in r on which binary operators can be applied?

1 Answers  


How data is aggregated in r?

1 Answers  


What do copy-on-change issues in r?

1 Answers  


What are applications of recursion?

1 Answers  


What is the recycling of elements in a vector? Give an example.

1 Answers  


What is the Use of String Utilities in the edtdbg Debugging Tool in R string manipulation?

1 Answers  


What is variance in r?

1 Answers  


How do you build and evaluate a random forest in r?

1 Answers  


What are tools for debugging in r?

1 Answers  


What is a motivation behind data visualization in R?

1 Answers  


What are features of r functions?

1 Answers  


Which function is used to write files?

1 Answers  


Categories