RDocumentation
rdocumentation.org βΊ packages βΊ base βΊ versions βΊ 3.6.2 βΊ topics βΊ summary
summary function - RDocumentation
summary is a generic function used to produce result summaries of the results of various model fitting functions. The function invokes particular methods which depend on the class of the first argument.
Statology
statology.org βΊ home βΊ how to use summary() function in r (with examples)
How to Use summary() Function in R (With Examples)
August 18, 2021 - Error t value Pr(>|t|) (Intercept) 88.4848 22.1050 4.003 0.0103 * x 0.1212 0.6526 0.186 0.8599 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.668 on 5 degrees of freedom Multiple R-squared: 0.006853, Adjusted R-squared: -0.1918 F-statistic: 0.0345 on 1 and 5 DF, p-value: 0.8599 ... The following code shows how to use the summary() function to summarize the results of an ANOVA model in R:
Videos
05:51
summary Function in R (3 Examples) | Descriptive Statistics of ...
13:03
R Basics 20: Descriptive Statistics using the summary function ...
12:12
Gentle R #4: Basic Summary Statistics in R with R Studio - YouTube
03:21
Summary () Function in R - YouTube
The Summary Function in R - YouTube
Easy Summary Tables in R with gtsummary
GeeksforGeeks
geeksforgeeks.org βΊ r language βΊ how-to-use-summary-function-in-r
How to use Summary Function in R? - GeeksforGeeks
July 23, 2025 - In this article, we will explore the summary() function in the R programming language. Here we are going to create a vector with some elements and get the summary statistics using the summary() function. ... Here we are going to get the summary of all columns in the dataframe. ... data = data.frame(col1=c(1: 5, 56, 43, 56, 78, 51), col2=c(100: 104, 56, 43, 56, 78, 51), col3=c(1: 5, 34, 56, 78, 76, 79)) print(data) print(summary(data))
ETH Zurich
stat.ethz.ch βΊ R-manual βΊ R-devel βΊ library βΊ base βΊ html βΊ summary.html
R: Object Summaries
The default method returns an object of class c("summaryDefault", "table") which has specialized format and print methods.
Tidyverse
dplyr.tidyverse.org βΊ reference βΊ summarise.html
Summarise each group down to one row β summarise β’ dplyr
This was the only supported option before version 1.0.0. ... When .groups is not specified, it is set to "drop_last" for a grouped data frame, and "keep" for a rowwise data frame. In addition, a message informs you of how the result will be grouped unless the result is ungrouped, the option "dplyr.summarise...
DataCamp
statmethods.net βΊ stats βΊ descriptives.html
Descriptive Statistics in R
One method of obtaining descriptive statistics is to use the sapply( ) function with a specified summary statistic. # get means for variables in data frame mydata # excluding missing values sapply(mydata, mean, na.rm=TRUE)
Danieldsjoberg
danieldsjoberg.com βΊ gtsummary
Presentation-Ready Data Summary and Analytic Result Tables β’ gtsummary
Summarize data frames or tibbles easily in R. Perfect for presenting descriptive statistics, comparing group demographics (e.g creating a Table 1 for medical journals), and more.
Learnbymarketing
learnbymarketing.com βΊ tutorials βΊ explaining-the-lm-summary-in-r
Explaining the lm() Summary in R β Learn by Marketing
#F-Statistic #Ho: All coefficients are zero #Ha: At least one coefficient is nonzero #Compare test statistic to F Distribution table n<-length(y) SSE<-sum(model$residuals**2) SSyy<-sum((y-mean(y))**2) k<-length(model$coefficients)-1 ((SSyy-SSE)/k) / (SSE/(n-(k+1))) ... The reason for this test is based on the fact that if you run multiple hypothesis tests (namely, on your coefficients), youβre likely to include a variable that isnβt actually significant. See this for an example (and an explanation). You can now replicate the summary statistics produced by Rβs summary function on linear regression (lm) models!
Educative
educative.io βΊ answers βΊ what-is-the-summarize-method-in-r
What is the summarize() method in R?
For example, if we want to calculate the average of the input data, It will only return a row containing a value that represents the mean of the data. The goal is to turn data into information, and information into insight. ... The summarize() method fits perfectly with this goal, helping us turn raw data into meaningful information that can then be used to get in-depth insights into our research or analytical queries.
Modelsummary
modelsummary.com βΊ vignettes βΊ datasummary.html
Data Summaries β modelsummary: Data and Model Summaries in R
This table was created using the "datasummary" function from the "modelsummary" package for R.' reference <- 'Source: Lalonde (1986) American Economic Review.' library(modelsummary) datasummary_balance(~Treatment, data = training, title = caption, notes = reference) Note that if the dataset includes columns called βblocksβ, βclustersβ, or βweightsβ, this information will automatically be taken into consideration by estimatr when calculating the difference in means and the associated statistics. Users can also use the ~ 1 formula to indicate that they want to summarize all the data instead of splitting the analysis across subgroups:
Top answer 1 of 15
151
1. tapply
I'll put in my two cents for tapply().
tapply(df$dt, df$group, summary)
You could write a custom function with the specific statistics you want or format the results:
tapply(df$dt, df$group,
function(x) format(summary(x), scientific = TRUE))
$A
Min. 1st Qu. Median Mean 3rd Qu. Max.
"5.900e+01" "5.975e+01" "6.100e+01" "6.100e+01" "6.225e+01" "6.300e+01"
$B
Min. 1st Qu. Median Mean 3rd Qu. Max.
"6.300e+01" "6.425e+01" "6.550e+01" "6.600e+01" "6.675e+01" "7.100e+01"
$C
Min. 1st Qu. Median Mean 3rd Qu. Max.
"6.600e+01" "6.725e+01" "6.800e+01" "6.800e+01" "6.800e+01" "7.100e+01"
$D
Min. 1st Qu. Median Mean 3rd Qu. Max.
"5.600e+01" "5.975e+01" "6.150e+01" "6.100e+01" "6.300e+01" "6.400e+01"
2. data.table
The data.table package offers a lot of helpful and fast tools for these types of operation:
library(data.table)
setDT(df)
> df[, as.list(summary(dt)), by = group]
group Min. 1st Qu. Median Mean 3rd Qu. Max.
1: A 59 59.75 61.0 61 62.25 63
2: B 63 64.25 65.5 66 66.75 71
3: C 66 67.25 68.0 68 68.00 71
4: D 56 59.75 61.5 61 63.00 64
2 of 15
71
dplyr package could be nice alternative to this problem:
library(dplyr)
df %>%
group_by(group) %>%
summarize(mean = mean(dt),
sum = sum(dt))
To get 1st quadrant and 3rd quadrant
df %>%
group_by(group) %>%
summarize(q1 = quantile(dt, 0.25),
q3 = quantile(dt, 0.75))
Csu-r
csu-r.github.io βΊ Module1 βΊ summary-statistics.html
5.3 Summary Statistics | R Module 1
sport Alpine Skiing Archery Art ... Patrol 1 25 2 Modern Pentathlon Nordic Combined Polo 37 25 4 Rhythmic Gymnastics Rowing Rugby 9 190 4 Rugby Sevens Sailing Shooting 6 126 218 Short Track Speed Skating Skeleton Ski Jumping 23 4 45 Snowboarding Softball Speed Skating 19 10 104 Swimming Synchronized Swimming Table Tennis 399 9 36 Taekwondo Tennis Trampolining 10 45 4 Triathlon Tug-Of-War Volleyball 6 5 50 Water Polo Weightlifting Wrestling 79 85 123 ... # Assign summary statistics ...
UCLA
math.ucla.edu βΊ ~anderson βΊ rw1001 βΊ library βΊ base βΊ html βΊ summary.html
R: Object Summaries
summary is a generic function used to produce result summaries of the results of various model fitting functions. The function invokes particular methods which depend on the class of the first argument. summary(object, ...) summary.default (object, ..., digits = max(3, getOption("digits") -3)) ...
CRAN
cran.r-project.org βΊ web βΊ packages βΊ vtable βΊ vignettes βΊ sumtable.html
sumtable: Summary Statistics - CRAN - R Project
December 20, 2024 - If there are multiple βcolumnsβ of summary statistics and you want different statistics in each column, make summ and summ.names into a list, where each entry is a character vector of the calculations/names you want in that column. sumtable(iris, summ=c('notNA(x)', 'mean(x)', 'median(x)', 'propNA(x)')) ## Warning in sumtable(iris, summ = c("notNA(x)", "mean(x)", "median(x)", "propNA(x)")): Factor variables ignore custom summ options. Cols 1 and 2 are count and percentage.
RDocumentation
rdocumentation.org βΊ packages βΊ stats βΊ versions βΊ 3.6.2 βΊ topics βΊ summary.lm
summary.lm Summarizing Linear Model Fits
the above \(R^2\) statistic βadjustedβ, penalizing for higher \(p\). cov.unscaled Β· a \(p \times p\) matrix of (unscaled) covariances of the \(\hat\beta_j\), \(j=1, \dots, p\). correlation Β· the correlation matrix corresponding to the above cov.unscaled, if correlation = TRUE is specified. symbolic.cor Β· (only if correlation is true.) The value of the argument symbolic.cor. na.action Β· from object, if present there. print.summary.lm tries to be smart about formatting the coefficients, standard errors, etc.