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

Function documentation

Before even thinking of using an R function, you should clarify which arguments it expects. All the relevant details such as a description, usage, and arguments can be found in the documentation. To consult the documentation on the sample() function, for example, you can use one of following R commands:

help(sample)
?sample

If you execute these commands, you'll be redirected to www.rdocumentation.org.

A quick hack to see the arguments of the sample() function is the args() function. Try it out in the console:

args(sample)

In the next exercises, you'll be learning how to use the mean() function with increasing complexity. The first thing you'll have to do is get acquainted with the mean() function.

Bu egzersiz

Intermediate R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Consult the documentation on the mean() function: ?mean or help(mean).
  • Inspect the arguments of the mean() function using the args() function.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Consult the documentation on the mean() function


# Inspect the arguments of the mean() function
Kodu Düzenle ve Çalıştır