Get Summary of Results produced by Functions in R Programming - summary() Function Last Updated : 23 Jun, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report summary() function in R Language is a generic function used to produce result summaries of the results of various model fitting functions. Syntax: summary(object, maxsum) Parameters: object: R object maxsum: integer value which indicates how many levels should be shown for factors Example 1: Python3 # R program to illustrate # summary function # Initializing a character and # integer vector x <- c("GFG", "gfg", "Geek", "Geeks") y <- c(1, 2, 3, 4) # Calling summary() function summary(x) summary(y) Output: Length Class Mode 4 character character Min. 1st Qu. Median Mean 3rd Qu. Max. 1.00 1.75 2.50 2.50 3.25 4.00 Example 2: Python3 # R program to illustrate # summary function # Initializing a data set state.region # Calling summary() function to # get the factor for above data set # Getting all the possible levels summary(state.region) # Getting maximum 3 levels summary(state.region, maxsum = 3) Output: [1] South West West South West [6] West Northeast South South South [11] West West North Central North Central North Central [16] North Central South South Northeast South [21] Northeast North Central North Central South North Central [26] West North Central West Northeast Northeast [31] West Northeast South North Central North Central [36] South West Northeast Northeast South [41] North Central South South West Northeast [46] South West South North Central West Levels: Northeast South North Central West Northeast South North Central West 9 16 12 13 South West (Other) 16 13 21 Comment More infoAdvertise with us Next Article Search and Return an Object with the specified name in R Programming - get() Function K Kanchan_Ray Follow Improve Article Tags : R Language R Functions R Object-Function Similar Reads Tukey's Five-number Summary in R Programming - fivenum() function fivenum() function in R Language is used to return Tukey's five-number summary of input data i.e., minimum value, lower-hinge value, median value, upper-hinge value and maximum value of the input data. Syntax: fivenum(x, na.rm = TRUE) Parameters: x: indicates numeric object na.rm: indicates logical 1 min read Applying a Function over an Object in R Programming - sapply() Function sapply() function in R Language takes list, vector or data frame as input and gives output in vector or matrix. It is useful for operations on list objects and returns a list object of same length of original set. Syntax: sapply(X, FUN) Parameters: X: A vector or an object FUN: Function applied to e 1 min read Condense Column Values of a Data Frame in R Programming - summarise() Function summarise() function in R Language is used to condense various values of column of a data frame to one value. Syntax: summarise(x, expr) Parameters: x: Data Frame expr: Operation to condense data Example 1: Python3 1== # R program to condense data # of a data frame # Loading library library(dplyr) # 1 min read Types of Functions in R Programming A function is a set of statements orchestrated together to perform a specific operation. A function is an object so the interpreter is able to pass control to the function, along with arguments that may be necessary for the function to accomplish the actions. The function in turn performs the task a 6 min read Search and Return an Object with the specified name in R Programming - get() Function get() function in R Language is used to return an object with the name specified as argument to the function. This is another method of printing values of the objects just like print function. This function can also be used to copy one object to another. Syntax: get(object) Parameters: object: Vecto 1 min read Perform Linear Regression Analysis in R Programming - lm() Function lm() function in R Language is a linear model function, used for linear regression analysis. Syntax: lm(formula) Parameters: formula: model description, such as x ~ y Example 1: Python3 # R program to illustrate # lm function # Creating two vectors x and y x <- c(rep(1:20)) y <- x * 2 # Callin 1 min read Like