Search notes:

R function: mode

#
#   Compare with -> typeof and -> ../dataTypes/vector_types.R
#


mode(42)
# [1] "numeric"

mode("foo")
# [1] "character"

mode(2+4i)
# [1] "complex"

mode(as.Date("2014-06-25"))
# [1] "numeric"

mode(c(1,2,3))
# [1] "numeric"

mode(vector())
# [1] "logical"

mode(factor(c(1,2,3)))
# [1] "numeric"

mode(TRUE)
# [1] "logical"

mode(mode)
# [1] "function"

mode(NA)
# [1] "logical"

mode(NULL)
# [1] "NULL"

mode(+Inf)
# [1] "numeric"

mode(table(c("Foo", "Bar", "Baz")))
# [1] "numeric"

mode(data.frame())
# [1] "list"

data <- read.csv("data.csv")
mode(data)
# [1] "list"

formula <- ~ x
mode(formula)
# [1] "call"
Github repository about-r, path: /functions/mode.R

See also

Exploring R objects
typeof(…), class(…)
Index to (some) R functions
mode

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1745472646, '18.191.150.214', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/functions/mode(100): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78