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 87
Slots:
Name: y
Class: numeric
> removeClass("Ohno")
[1] TRUE
> tryCatch(getClass("Ohno"), error = function(x) "Ohno is gone")
[1] "Ohno is gone"
3.4.1.1 Introspection
Once a class has been defined, there are a number of software tools that
can be used to find out about that class. These include getSlots that will
report the slot names and types, the function slotNames that will report only
the slot names. These functions are demonstrated using the class A defined
ab ove.
> getSlots("A")
s1
"numeric"
> slotNames("A")
[1] "s1"
The class itself can be retrieved using getClass.The function extends can
b e called with either the name ...
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