Dear R People: When creating a package, how do you include new methods and classes, please? I'm using the pacakge.skeleton command as a starting point. Thanks, Sincerely, Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: hodgess at gator.uhd.edu
See https://www.stat.math.ethz.ch/pipermail/r-help/2006-January/083783.html where I mentioned both S3 and S4 examples you can use as examples. The source to these packages is available on CRAN. On 1/7/06, Erin Hodgess <hodgess at gator.dt.uh.edu> wrote:> Dear R People: > > When creating a package, how do you include new methods and classes, > please? > > I'm using the pacakge.skeleton command as a starting point. > > Thanks, > Sincerely, > Erin Hodgess > Associate Professor > Department of Computer and Mathematical Sciences > University of Houston - Downtown > mailto: hodgess at gator.uhd.edu > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >
Erin, On 7 January 2006 at 18:36, Erin Hodgess wrote: | When creating a package, how do you include new methods and classes, | please? As you are undoubtedly aware, there are over 600 packages on CRAN. All of these have source code that you can study. If you find one too obscure, drop it and pick another. There _really_ is a lot to choose from. Some have S4 classes, some have S3 classes. You didn't even ask which one you're after. Moreover, essentially the same question came up with the last week. You could for example compare its (S4) with zoo (S3). Lastly, by what we could call the 'Liaw-Baron principle', every question that can be asked has in fact alreadey been asked -- RSiteSearch() really is your friend. E.g. > RSiteSearch("S3 class examples") > RSiteSearch("S4 class examples") yield, respectively, 1752 and 245 hits. Hope this helps, Dirk -- Hell, there are no rules here - we're trying to accomplish something. -- Thomas A. Edison