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 a new s3 class?



How to construct a new s3 class?..

Answer / Maneesh Singh Rajput

To create a new S3 class in R, you need to define a constructor function with the name `create.myclass()`, and set the class attribute of an object created with this function: `setClass("myClass", contains = list(myAttribute = "character"))`. You can then create objects of this class using `myObject <- create.myClass(myAttribute = "value")`.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More R Programming Interview Questions

How would you create a scatterplot using ggplot2 package?

1 Answers  


What are the data structures in R that are used to perform statistical analyses and create graphs?

1 Answers  


give examples of while and for loop in r.

1 Answers  


How data is aggregated in r?

1 Answers  


What is an arbitrary function in r?

1 Answers  


How would you measure correlation in r?

1 Answers  


How to use sapply in r?

1 Answers  


Explain the different data structures in r?

1 Answers  


What are the features of r programming?

1 Answers  


What is meant by ANOVA models in R?

1 Answers  


Which data object in r is used to store and process categorical data?

1 Answers  


Name some functions which can be used for debugging in r?

1 Answers  


Categories