BaşlayınÜcretsiz başlayın

Finding Available Methods (1)

To find all the available methods for an S3 generic, call the methods() (docs) function.

It takes one argument that can be passed with or without quotes (though quoting is preferred, since the lookup feature to turn an R expression into a string is not perfect). This example shows both syntaxes, applied to the generic wilcox.text() (docs) for running Wilcoxon-Mann-Whitney rank sum tests. They give the same output:

> methods("wilcox.test")
[1] wilcox.test.default* wilcox.test.formula*
see '?methods' for accessing help and source code

> methods(wilcox.test)
[1] wilcox.test.default* wilcox.test.formula*
see '?methods' for accessing help and source code

Bu egzersiz, kursun bir parçasıdır

Object-Oriented Programming with S3 and R6 in R

Kursa Göz Atın

Egzersiz talimatları

Find all the available methods for the print() generic function.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Find methods for print
___
Kodu Düzenle ve Çalıştır