Search notes:

R function: summary

The summary function returns some statistics for vectors, matrices or data frames
With both, the median and the mean, it's possible to detect skew in the data.
#
# shows minumum, maximum, mean, median, first (25%) and third (75%) quartiles. For
# factors (or categorical variables), it shows the frequency of every level.
#
# See also -> min, -> median, -> quantile, -> max
#

summary(c(  4, 9, 5, 1000, 11, 5, 8) )
#  Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
#   4.0     5.0     8.0   148.9    10.0  1000.0

cat ("\n\n\n")

summary("Foo")
#  Length     Class      Mode
#       1 character character

cat ("\n\n\n")

# Summary of a Factor:
#
#   print Elements along with their frequency. (See also -> factor and -> levels)
summary (factor (c ( "foo", "bar", "bar", "foo", "foo", "baz")))
#  bar baz foo
#    2   1   3
Github repository about-r, path: /functions/summary.R

See also

mean, min, max, quantile
Exploring R objects
Index to (some) R functions

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...', 1745475228, '18.117.229.13', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/functions/summary(74): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78