Skip to Main Content
R Programming for Bioinformatics
book

R Programming for Bioinformatics

by Robert Gentleman
July 2008
Intermediate to advanced content levelIntermediate to advanced
328 pages
10h 53m
English
Chapman and Hall/CRC
Content preview from R Programming for Bioinformatics
Object-Oriented Programming in R 107
3.4.10 Replacement methods
Replacement functions were discussed in Section 2.7, and S3 replacement
functions were discussed in Section 3.3.6. S4 replacement methods are quite
similar. They require that an appropriate S4 generic function be defined;
usually its name is of the form genfun<-. You must ensure that the method
returns the whole object and that the last argument is named value. This
ensures that R can always identify the value that is going to be assigned.
We continue the example given above and define a method that will change
the value in the slot named a. We first define an appropriate generic function
and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Computation in BioInformatics

Computation in BioInformatics

S. Balamurugan, Anand T. Krishnan, Dinesh Goyal, Balakumar Chandrasekaran, Boomi Pandi
R for Data Science Cookbook (n)

R for Data Science Cookbook (n)

Prabhanjan Narayanachar Tattar, Yu-Wei, Chiu (David Chiu)

Publisher Resources

ISBN: 9781420063677