Learn R Programming

pryr (version 0.1.6)

ftype: Determine function type.

Description

This function figures out whether the input function is a regular/primitive/internal function, a internal/S3/S4 generic, or a S3/S4/RC method. This is function is slightly simplified as it's possible for a method from one class to be a generic for another class, but that seems like such a bad idea that hopefully no one has done it.

Usage

ftype(f)

Value

a character of vector of length 1 or 2.

Arguments

f

unquoted function name

See Also

Other object inspection: otype(), sexp_type()

Examples

Run this code
ftype(`%in%`)
ftype(sum)
ftype(t.data.frame)
ftype(t.test) # Tricky!
ftype(writeLines)
ftype(unlist)

Run the code above in your browser using DataLab