Professional Documents
Culture Documents
JJ’s Angels
2024-03-14
library(tidyverse)
library(janitor)
##
## Attaching package: 'janitor'
##
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
antlion<-antlion%>%
janitor::clean_names()
View(antlion)
str(antlion)
names(antlion)
## [4] "mean_diameter"
library(ggplot2)
##
## Call:
## lm(formula = mean_diameter ~ distance_to_neighbour, data = antlion)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.2460 -7.9612 -0.3502 7.8173 22.4017
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.753390 1.194501 19.048 < 2e-16 ***
## distance_to_neighbour 0.052110 0.008195 6.359 2.14e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 9.887 on 156 degrees of freedom
## Multiple R-squared: 0.2058, Adjusted R-squared: 0.2007
## F-statistic: 40.43 on 1 and 156 DF, p-value: 2.141e-09