Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see https://quarto.org.
Running Code
When you click the Render button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
library(lme4)
Loading required package: Matrix
library(lmerTest)
Attaching package: 'lmerTest'
The following object is masked from 'package:lme4':
lmer
The following object is masked from 'package:stats':
step
library(emmeans)library(car)
Loading required package: carData
library(RVAideMemoire)
*** Package RVAideMemoire v 0.9-81 ***
Attaching package: 'RVAideMemoire'
The following object is masked from 'package:lme4':
dummy
library(DHARMa)
This is DHARMa 0.4.4. For overview type '?DHARMa'. For recent changes, type news(package = 'DHARMa')
library(MuMIn)library(tidyverse)
Warning: package 'tidyverse' was built under R version 4.1.3
Warning: package 'ggplot2' was built under R version 4.1.3
Warning: package 'tibble' was built under R version 4.1.3
Warning: package 'tidyr' was built under R version 4.1.3
Warning: package 'readr' was built under R version 4.1.3
Warning: package 'purrr' was built under R version 4.1.3
Warning: package 'dplyr' was built under R version 4.1.3
Warning: package 'stringr' was built under R version 4.1.3
Warning: package 'forcats' was built under R version 4.1.3
Warning: package 'lubridate' was built under R version 4.1.3
-- Attaching core tidyverse packages ------------------------ tidyverse 2.0.0 --
v dplyr 1.1.2 v readr 2.1.4
v forcats 1.0.0 v stringr 1.5.0
v ggplot2 3.4.2 v tibble 3.2.1
v lubridate 1.9.2 v tidyr 1.3.0
v purrr 1.0.1
-- Conflicts ------------------------------------------ tidyverse_conflicts() --
x tidyr::expand() masks Matrix::expand()
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
x tidyr::pack() masks Matrix::pack()
x dplyr::recode() masks car::recode()
x purrr::some() masks car::some()
x tidyr::unpack() masks Matrix::unpack()
i Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(glmmTMB)
Warning in checkMatrixPackageVersion(): Package version inconsistency detected.
TMB was built with Matrix version 1.4.0
Current Matrix version is 1.3.4
Please re-install 'TMB' from source using install.packages('TMB', type = 'source') or ask CRAN for a binary version of 'TMB' matching CRAN's 'Matrix' package
ID LINE SIRE DAM
Min. :96251326 Min. :65 Min. :87591163 Min. :86315923
1st Qu.:96601065 1st Qu.:65 1st Qu.:89122431 1st Qu.:90888369
Median :97257792 Median :65 Median :90896190 Median :92297569
Mean :97267678 Mean :65 Mean :90604058 Mean :91786593
3rd Qu.:97887849 3rd Qu.:65 3rd Qu.:92013824 3rd Qu.:93218718
Max. :98368540 Max. :65 Max. :93693188 Max. :94232962
LITTER PEN FARM ENTRY_TIME
Min. :78043165 Length:114263 Min. :774 Length:114263
1st Qu.:78261882 Class :character 1st Qu.:774 Class :character
Median :78637026 Mode :character Median :774 Mode :character
Mean :78609475 Mean :774
3rd Qu.:78945651 3rd Qu.:774
Max. :79177365 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:114263 Min. : 5 Min. :-3543.0 Min. :-913
Class :character 1st Qu.: 576 1st Qu.: 245.0 1st Qu.: 817
Mode :character Median : 1315 Median : 593.0 Median :1117
Mean : 1402 Mean : 638.9 Mean :1167
3rd Qu.: 2038 3rd Qu.: 947.0 3rd Qu.:1480
Max. :10169 Max. : 9102.0 Max. :9090
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. :-913.0 Min. : 4.00 Length:114263 Length:114263
1st Qu.: 414.0 1st Qu.:13.00 Class :character Class :character
Median : 516.0 Median :31.00 Mode :character Mode :character
Mean : 528.1 Mean :28.65
3rd Qu.: 635.0 3rd Qu.:46.00
Max. :3917.0 Max. :64.00
summary(data$PEN)
Length Class Mode
114263 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-3543.0 245.0 593.0 638.9 947.0 9102.0
summary(data$STAY_IN)
Min. 1st Qu. Median Mean 3rd Qu. Max.
5 576 1315 1402 2038 10169
summary(data$ENTRY_TIME)
Length Class Mode
114263 character character
summary(data$EXIT_TIME)
Length Class Mode
114263 character character
summary(data$ENTRY_WT)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-913 817 1117 1167 1480 9090
summary(data$EXIT_WT)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-913.0 414.0 516.0 528.1 635.0 3917.0
library(ggplot2)# Convert PEN column to numeric#data$PEN <- as.numeric(data$PEN)# Categorize PEN as a factor with 15 groupsdata$PEN <-factor(data$PEN)# Plotting boxplotsggplot(data = data, aes(x= PEN, y= FEED_INTK))+geom_boxplot(outlier.shape =1)+theme(axis.text.x =element_text(hjust =1))+labs(title ="Boxplot of FEED_INTK by PEN")+labs(y="FEED_INTAKE")+labs(x="PEN")+theme(legend.position ="none")
ggplot(data = data, aes(x= PEN, y= STAY_IN))+geom_boxplot(outlier.shape =1)+theme(axis.text.x =element_text(hjust =1))+labs(title ="Boxplot of STAY_IN by PEN")+labs(y="STAY_IN")+labs(x="PEN")+theme(legend.position ="none")
ï..ANIMAL LINE SIRE DAM
Min. :96263594 Min. :65 Min. :87705189 Min. :88083537
1st Qu.:96329107 1st Qu.:65 1st Qu.:88291968 1st Qu.:91936064
Median :97107601 Median :65 Median :90086235 Median :92340204
Mean :97064505 Mean :65 Mean :89878923 Mean :92187127
3rd Qu.:97887845 3rd Qu.:65 3rd Qu.:91399695 3rd Qu.:92991230
Max. :97916804 Max. :65 Max. :92013924 Max. :93704367
LITTER PEN FARM ENTRY_TIME
Min. :78043285 Length:9463 Min. :774 Length:9463
1st Qu.:78084824 Class :character 1st Qu.:774 Class :character
Median :78551231 Mode :character Median :774 Mode :character
Mean :78489190 Mean :774
3rd Qu.:78945651 3rd Qu.:774
Max. :78970756 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:9463 Min. : 5 Min. :-405.0 Min. : -17
Class :character 1st Qu.: 747 1st Qu.: 324.0 1st Qu.: 857
Mode :character Median :1385 Median : 651.0 Median :1179
Mean :1417 Mean : 680.2 Mean :1205
3rd Qu.:1990 3rd Qu.: 985.0 3rd Qu.:1514
Max. :6038 Max. :4198.0 Max. :4457
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. :-246.0 Min. :4 Length:9463 Length:9463
1st Qu.: 411.0 1st Qu.:4 Class :character Class :character
Median : 521.0 Median :4 Mode :character Mode :character
Mean : 525.1 Mean :4
3rd Qu.: 650.0 3rd Qu.:4
Max. :1009.0 Max. :4
summary(data$PEN)
Length Class Mode
9463 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-405.0 324.0 651.0 680.2 985.0 4198.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ANIMAL <-factor(data$ï..ANIMAL)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ANIMAL, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :96251326 Min. :65 Min. :87705189 Min. :87744112
1st Qu.:96284922 1st Qu.:65 1st Qu.:88890328 1st Qu.:90024496
Median :97107627 Median :65 Median :91399695 Median :92297571
Mean :97139416 Mean :65 Mean :90663373 Mean :91653050
3rd Qu.:97900222 3rd Qu.:65 3rd Qu.:92013924 3rd Qu.:92991230
Max. :97916970 Max. :65 Max. :92765993 Max. :93704367
LITTER PEN FARM ENTRY_TIME
Min. :78043165 Length:10402 Min. :774 Length:10402
1st Qu.:78064883 Class :character 1st Qu.:774 Class :character
Median :78551241 Mode :character Median :774 Mode :character
Mean :78535890 Mean :774
3rd Qu.:78950700 3rd Qu.:774
Max. :78970756 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:10402 Min. : 5 Min. :-3148.0 Min. : -10
Class :character 1st Qu.: 614 1st Qu.: 276.0 1st Qu.: 834
Mode :character Median :1239 Median : 582.0 Median :1097
Mean :1320 Mean : 613.3 Mean :1143
3rd Qu.:1875 3rd Qu.: 893.0 3rd Qu.:1434
Max. :7808 Max. : 2644.0 Max. :3101
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. : -28.0 Min. :5 Length:10402 Length:10402
1st Qu.: 422.0 1st Qu.:5 Class :character Class :character
Median : 518.0 Median :5 Mode :character Mode :character
Mean : 529.8 Mean :5
3rd Qu.: 634.0 3rd Qu.:5
Max. :3704.0 Max. :5
summary(data$PEN)
Length Class Mode
10402 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-3148.0 276.0 582.0 613.3 893.0 2644.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :96351936 Min. :65 Min. :88153118 Min. :86315923
1st Qu.:96426059 1st Qu.:65 1st Qu.:90086235 1st Qu.:90888369
Median :97178081 Median :65 Median :91236479 Median :91413012
Mean :97191085 Mean :65 Mean :90954866 Mean :91622656
3rd Qu.:98046376 3rd Qu.:65 3rd Qu.:91399695 3rd Qu.:92991235
Max. :98064866 Max. :65 Max. :92913144 Max. :93921830
LITTER PEN FARM ENTRY_TIME
Min. :78088090 Length:9475 Min. :774 Length:9475
1st Qu.:78124460 Class :character 1st Qu.:774 Class :character
Median :78593357 Mode :character Median :774 Mode :character
Mean :78566902 Mean :774
3rd Qu.:79026957 3rd Qu.:774
Max. :79035939 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:9475 Min. : 5.0 Min. :-597.0 Min. : -4
Class :character 1st Qu.: 552.5 1st Qu.: 212.0 1st Qu.: 782
Mode :character Median :1308.0 Median : 559.0 Median :1056
Mean :1412.4 Mean : 611.0 Mean :1127
3rd Qu.:2065.0 3rd Qu.: 919.5 3rd Qu.:1440
Max. :7200.0 Max. :4736.0 Max. :4769
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. :-14 Min. :13 Length:9475 Length:9475
1st Qu.:411 1st Qu.:13 Class :character Class :character
Median :507 Median :13 Mode :character Mode :character
Mean :516 Mean :13
3rd Qu.:620 3rd Qu.:13
Max. :950 Max. :13
summary(data$PEN)
Length Class Mode
9475 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-597.0 212.0 559.0 611.0 919.5 4736.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :96336569 Min. :65 Min. :87705189 Min. :87315552
1st Qu.:96388748 1st Qu.:65 1st Qu.:90086235 1st Qu.:90090811
Median :97178041 Median :65 Median :91399695 Median :92264271
Mean :97152376 Mean :65 Mean :90793361 Mean :91670802
3rd Qu.:97989023 3rd Qu.:65 3rd Qu.:92013924 3rd Qu.:92991235
Max. :98028775 Max. :65 Max. :92913144 Max. :93909319
LITTER PEN FARM ENTRY_TIME
Min. :78080914 Length:9037 Min. :774 Length:9037
1st Qu.:78124460 Class :character 1st Qu.:774 Class :character
Median :78593349 Mode :character Median :774 Mode :character
Mean :78552021 Mean :774
3rd Qu.:78992588 3rd Qu.:774
Max. :79014310 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:9037 Min. : 5 Min. :-413.0 Min. : -2
Class :character 1st Qu.: 736 1st Qu.: 333.0 1st Qu.: 878
Mode :character Median :1377 Median : 647.0 Median :1180
Mean :1454 Mean : 680.7 Mean :1218
3rd Qu.:2045 3rd Qu.: 977.0 3rd Qu.:1507
Max. :7569 Max. :2880.0 Max. :3629
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. : -11.0 Min. :14 Length:9037 Length:9037
1st Qu.: 427.0 1st Qu.:14 Class :character Class :character
Median : 522.0 Median :14 Mode :character Mode :character
Mean : 537.1 Mean :14
3rd Qu.: 634.0 3rd Qu.:14
Max. :1478.0 Max. :14
summary(data$PEN)
Length Class Mode
9037 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-413.0 333.0 647.0 680.7 977.0 2880.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :96426258 Min. :65 Min. :88035510 Min. :88671945
1st Qu.:96449435 1st Qu.:65 1st Qu.:88291968 1st Qu.:92202167
Median :97257718 Median :65 Median :90223782 Median :93218718
Mean :97282666 Mean :65 Mean :90234165 Mean :92684043
3rd Qu.:98078091 3rd Qu.:65 3rd Qu.:92013824 3rd Qu.:93823330
Max. :98101593 Max. :65 Max. :92913144 Max. :94028645
LITTER PEN FARM ENTRY_TIME
Min. :78124471 Length:8825 Min. :774 Length:8825
1st Qu.:78147029 Class :character 1st Qu.:774 Class :character
Median :78637029 Mode :character Median :774 Mode :character
Mean :78618649 Mean :774
3rd Qu.:79045708 3rd Qu.:774
Max. :79073361 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:8825 Min. : 5 Min. :-1695.0 Min. : -22
Class :character 1st Qu.: 662 1st Qu.: 254.0 1st Qu.: 815
Mode :character Median : 1497 Median : 629.0 Median :1151
Mean : 1555 Mean : 686.2 Mean :1192
3rd Qu.: 2273 3rd Qu.: 1013.0 3rd Qu.:1532
Max. :10169 Max. : 9102.0 Max. :9090
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. : -73.0 Min. :22 Length:8825 Length:8825
1st Qu.: 404.0 1st Qu.:22 Class :character Class :character
Median : 509.0 Median :22 Mode :character Mode :character
Mean : 506.2 Mean :22
3rd Qu.: 631.0 3rd Qu.:22
Max. :2384.0 Max. :22
summary(data$PEN)
Length Class Mode
8825 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-1695.0 254.0 629.0 686.2 1013.0 9102.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :96426261 Min. :65 Min. :87591163 Min. :87808364
1st Qu.:96466413 1st Qu.:65 1st Qu.:88291968 1st Qu.:91399698
Median :97257835 Median :65 Median :90218081 Median :92264274
Mean :97219060 Mean :65 Mean :90297113 Mean :91845211
3rd Qu.:98064975 3rd Qu.:65 3rd Qu.:92001659 3rd Qu.:93085153
Max. :98101510 Max. :65 Max. :92765993 Max. :94017063
LITTER PEN FARM ENTRY_TIME
Min. :78124471 Length:8793 Min. :774 Length:8793
1st Qu.:78147030 Class :character 1st Qu.:774 Class :character
Median :78637038 Mode :character Median :774 Mode :character
Mean :78582938 Mean :774
3rd Qu.:79045689 3rd Qu.:774
Max. :79073361 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:8793 Min. : 5 Min. :-513.0 Min. : -14
Class :character 1st Qu.: 561 1st Qu.: 219.0 1st Qu.: 789
Mode :character Median :1548 Median : 659.0 Median :1192
Mean :1648 Mean : 730.8 Mean :1245
3rd Qu.:2488 3rd Qu.:1090.0 3rd Qu.:1616
Max. :7200 Max. :6828.0 Max. :6907
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. :-16.0 Min. :23 Length:8793 Length:8793
1st Qu.:403.0 1st Qu.:23 Class :character Class :character
Median :510.0 Median :23 Mode :character Mode :character
Mean :513.7 Mean :23
3rd Qu.:634.0 3rd Qu.:23
Max. :955.0 Max. :23
summary(data$PEN)
Length Class Mode
8793 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-513.0 219.0 659.0 730.8 1090.0 6828.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :96508440 Min. :65 Min. :88153118 Min. :86769255
1st Qu.:96525556 1st Qu.:65 1st Qu.:88291968 1st Qu.:91502588
Median :97331612 Median :65 Median :91399695 Median :91881549
Mean :97236551 Mean :65 Mean :90542366 Mean :91721480
3rd Qu.:98158010 3rd Qu.:65 3rd Qu.:92013924 3rd Qu.:92991228
Max. :98196775 Max. :65 Max. :92765993 Max. :94017122
LITTER PEN FARM ENTRY_TIME
Min. :78167463 Length:10628 Min. :774 Length:10628
1st Qu.:78167507 Class :character 1st Qu.:774 Class :character
Median :78667900 Mode :character Median :774 Mode :character
Mean :78586360 Mean :774
3rd Qu.:79085917 3rd Qu.:774
Max. :79094728 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:10628 Min. : 5 Min. :-1644.0 Min. : -10
Class :character 1st Qu.: 409 1st Qu.: 171.0 1st Qu.: 748
Mode :character Median :1211 Median : 539.5 Median :1060
Mean :1288 Mean : 577.5 Mean :1092
3rd Qu.:1953 3rd Qu.: 886.0 3rd Qu.:1424
Max. :6207 Max. : 4101.0 Max. :4156
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. :-320.0 Min. :31 Length:10628 Length:10628
1st Qu.: 403.0 1st Qu.:31 Class :character Class :character
Median : 510.0 Median :31 Mode :character Mode :character
Mean : 514.9 Mean :31
3rd Qu.: 631.0 3rd Qu.:31
Max. :2209.0 Max. :31
summary(data$PEN)
Length Class Mode
10628 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-1644.0 171.0 539.5 577.5 886.0 4101.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :96526101 Min. :65 Min. :87591163 Min. :88121788
1st Qu.:96554676 1st Qu.:65 1st Qu.:90118743 1st Qu.:89085546
Median :97386249 Median :65 Median :90118743 Median :92297569
Mean :97366593 Mean :65 Mean :90804935 Mean :91197025
3rd Qu.:98196770 3rd Qu.:65 3rd Qu.:92013824 3rd Qu.:93295079
Max. :98235844 Max. :65 Max. :93543534 Max. :94087144
LITTER PEN FARM ENTRY_TIME
Min. :78183527 Length:10394 Min. :774 Length:10394
1st Qu.:78455882 Class :character 1st Qu.:774 Class :character
Median :78696873 Mode :character Median :774 Mode :character
Mean :78687007 Mean :774
3rd Qu.:79105717 3rd Qu.:774
Max. :79148533 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:10394 Min. : 5.0 Min. :-1983.0 Min. :-106
Class :character 1st Qu.: 377.2 1st Qu.: 158.2 1st Qu.: 789
Mode :character Median :1142.0 Median : 533.5 Median :1089
Mean :1231.9 Mean : 580.6 Mean :1159
3rd Qu.:1874.5 3rd Qu.: 900.8 3rd Qu.:1472
Max. :6904.0 Max. : 3918.0 Max. :4578
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. :-709.0 Min. :32 Length:10394 Length:10394
1st Qu.: 442.0 1st Qu.:32 Class :character Class :character
Median : 556.0 Median :32 Mode :character Mode :character
Mean : 578.1 Mean :32
3rd Qu.: 676.0 3rd Qu.:32
Max. :2744.0 Max. :32
summary(data$PEN)
Length Class Mode
10394 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-1983.0 158.2 533.5 580.6 900.8 3918.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :98235721 Min. :65 Min. :88153118 Min. :88986846
1st Qu.:98241798 1st Qu.:65 1st Qu.:89122401 1st Qu.:91552616
Median :98245825 Median :65 Median :90086235 Median :92422025
Mean :98248865 Mean :65 Mean :90510697 Mean :92505463
3rd Qu.:98260667 3rd Qu.:65 3rd Qu.:92013824 3rd Qu.:93986494
Max. :98260715 Max. :65 Max. :93543534 Max. :94114138
LITTER PEN FARM ENTRY_TIME
Min. :78772999 Length:3182 Min. :774 Length:3182
1st Qu.:78827309 Class :character 1st Qu.:774 Class :character
Median :79129986 Mode :character Median :774 Mode :character
Mean :79038659 Mean :774
3rd Qu.:79136934 3rd Qu.:774
Max. :79157990 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:3182 Min. : 5.0 Min. :-368.0 Min. : -51
Class :character 1st Qu.: 607.2 1st Qu.: 265.0 1st Qu.: 798
Mode :character Median :1342.0 Median : 574.5 Median :1101
Mean :1397.7 Mean : 606.3 Mean :1116
3rd Qu.:2042.0 3rd Qu.: 901.0 3rd Qu.:1442
Max. :5504.0 Max. :6182.0 Max. :6294
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. :-81 Min. :37 Length:3182 Length:3182
1st Qu.:403 1st Qu.:37 Class :character Class :character
Median :512 Median :37 Mode :character Mode :character
Mean :510 Mean :37
3rd Qu.:640 3rd Qu.:37
Max. :873 Max. :37
summary(data$PEN)
Length Class Mode
3182 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-368.0 265.0 574.5 606.3 901.0 6182.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :96587411 Min. :65 Min. :87591163 Min. :87475902
1st Qu.:96600078 1st Qu.:65 1st Qu.:88291968 1st Qu.:88986856
Median :97413579 Median :65 Median :89122431 Median :89206556
Mean :97044462 Mean :65 Mean :89865734 Mean :89953383
3rd Qu.:97413847 3rd Qu.:65 3rd Qu.:92013924 3rd Qu.:91700296
Max. :97447356 Max. :65 Max. :92573432 Max. :92586308
LITTER PEN FARM ENTRY_TIME
Min. :78202518 Length:4975 Min. :774 Length:4975
1st Qu.:78206433 Class :character 1st Qu.:774 Class :character
Median :78705646 Mode :character Median :774 Mode :character
Mean :78483153 Mean :774
3rd Qu.:78716978 3rd Qu.:774
Max. :78739194 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:4975 Min. : 10 Min. :-483.0 Min. : -8
Class :character 1st Qu.: 785 1st Qu.: 343.0 1st Qu.: 867
Mode :character Median :1444 Median : 636.0 Median :1154
Mean :1629 Mean : 691.6 Mean :1206
3rd Qu.:2239 3rd Qu.: 958.0 3rd Qu.:1487
Max. :7544 Max. :5753.0 Max. :5873
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. :-20.0 Min. :39 Length:4975 Length:4975
1st Qu.:411.0 1st Qu.:39 Class :character Class :character
Median :505.0 Median :39 Mode :character Mode :character
Mean :514.1 Mean :39
3rd Qu.:616.0 3rd Qu.:39
Max. :872.0 Max. :39
summary(data$PEN)
Length Class Mode
4975 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-483.0 343.0 636.0 691.6 958.0 5753.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :98332707 Min. :65 Min. :93300264 Min. :92001656
1st Qu.:98332806 1st Qu.:65 1st Qu.:93423760 1st Qu.:94127690
Median :98340247 Median :65 Median :93513866 Median :94127690
Mean :98343555 Mean :65 Mean :93520752 Mean :93879648
3rd Qu.:98350859 3rd Qu.:65 3rd Qu.:93693188 3rd Qu.:94154670
Max. :98368540 Max. :65 Max. :93693188 Max. :94232962
LITTER PEN FARM ENTRY_TIME
Min. :79168210 Length:2526 Min. :774 Length:2526
1st Qu.:79168225 Class :character 1st Qu.:774 Class :character
Median :79168225 Mode :character Median :774 Mode :character
Mean :79168851 Mean :774
3rd Qu.:79168228 3rd Qu.:774
Max. :79177365 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:2526 Min. : 6 Min. :-302.0 Min. : -73.0
Class :character 1st Qu.: 732 1st Qu.: 306.2 1st Qu.: 838.2
Mode :character Median :1418 Median : 599.0 Median :1140.0
Mean :1431 Mean : 631.7 Mean :1147.2
3rd Qu.:1983 3rd Qu.: 897.0 3rd Qu.:1465.0
Max. :5298 Max. :3868.0 Max. :4024.0
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. :-72.0 Min. :48 Length:2526 Length:2526
1st Qu.:409.0 1st Qu.:48 Class :character Class :character
Median :526.0 Median :48 Mode :character Mode :character
Mean :515.5 Mean :48
3rd Qu.:653.0 3rd Qu.:48
Max. :971.0 Max. :48
summary(data$PEN)
Length Class Mode
2526 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-302.0 306.2 599.0 631.7 897.0 3868.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :96700367 Min. :65 Min. :88153118 Min. :86976475
1st Qu.:96718395 1st Qu.:65 1st Qu.:90086235 1st Qu.:88557540
Median :97503205 Median :65 Median :90086235 Median :92406525
Mean :97123746 Mean :65 Mean :90370131 Mean :91558823
3rd Qu.:97503662 3rd Qu.:65 3rd Qu.:91399695 3rd Qu.:93371359
Max. :97527961 Max. :65 Max. :92586305 Max. :93543503
LITTER PEN FARM ENTRY_TIME
Min. :78245467 Length:7575 Min. :774 Length:7575
1st Qu.:78273346 Class :character 1st Qu.:774 Class :character
Median :78746778 Mode :character Median :774 Mode :character
Mean :78516266 Mean :774
3rd Qu.:78756764 3rd Qu.:774
Max. :78792082 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:7575 Min. : 5.0 Min. :-2469.0 Min. :-913
Class :character 1st Qu.: 383.5 1st Qu.: 147.0 1st Qu.: 758
Mode :character Median :1004.0 Median : 489.0 Median :1020
Mean :1181.6 Mean : 545.6 Mean :1086
3rd Qu.:1792.0 3rd Qu.: 841.0 3rd Qu.:1397
Max. :7200.0 Max. : 5094.0 Max. :5164
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. :-913.0 Min. :46 Length:7575 Length:7575
1st Qu.: 415.0 1st Qu.:46 Class :character Class :character
Median : 516.0 Median :46 Mode :character Mode :character
Mean : 539.9 Mean :46
3rd Qu.: 629.0 3rd Qu.:46
Max. :3538.0 Max. :46
summary(data$PEN)
Length Class Mode
7575 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-2469.0 147.0 489.0 545.6 841.0 5094.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :96767514 Min. :65 Min. :87591163 Min. :88105161
1st Qu.:96804972 1st Qu.:65 1st Qu.:90086235 1st Qu.:91726047
Median :96814494 Median :65 Median :90118743 Median :92470144
Mean :97168246 Mean :65 Mean :90413390 Mean :91827483
3rd Qu.:97574347 3rd Qu.:65 3rd Qu.:90896190 3rd Qu.:92700821
Max. :97595852 Max. :65 Max. :92765993 Max. :93543626
LITTER PEN FARM ENTRY_TIME
Min. :78281449 Length:7123 Min. :774 Length:7123
1st Qu.:78419358 Class :character 1st Qu.:774 Class :character
Median :78419389 Mode :character Median :774 Mode :character
Mean :78584642 Mean :774
3rd Qu.:78784788 3rd Qu.:774
Max. :78813421 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:7123 Min. : 5 Min. :-2226.0 Min. : 39
Class :character 1st Qu.: 593 1st Qu.: 259.0 1st Qu.: 812
Mode :character Median :1232 Median : 580.0 Median :1063
Mean :1280 Mean : 615.8 Mean :1128
3rd Qu.:1851 3rd Qu.: 904.5 3rd Qu.:1420
Max. :7200 Max. : 4894.0 Max. :5002
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. : -2.0 Min. :52 Length:7123 Length:7123
1st Qu.: 412.0 1st Qu.:52 Class :character Class :character
Median : 501.0 Median :52 Mode :character Mode :character
Mean : 511.8 Mean :52
3rd Qu.: 608.0 3rd Qu.:52
Max. :2995.0 Max. :52
summary(data$PEN)
Length Class Mode
7123 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-2226.0 259.0 580.0 615.8 904.5 4894.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :96920449 Min. :65 Min. :88095568 Min. :87705201
1st Qu.:96954425 1st Qu.:65 1st Qu.:90086235 1st Qu.:92024847
Median :97725548 Median :65 Median :91399695 Median :92841318
Mean :97377083 Mean :65 Mean :90928510 Mean :92359944
3rd Qu.:97734522 3rd Qu.:65 3rd Qu.:92013824 3rd Qu.:93615194
Max. :97756384 Max. :65 Max. :92586305 Max. :93679776
LITTER PEN FARM ENTRY_TIME
Min. :78474103 Length:5969 Min. :774 Length:5969
1st Qu.:78483996 Class :character 1st Qu.:774 Class :character
Median :78858550 Mode :character Median :774 Mode :character
Mean :78693292 Mean :774
3rd Qu.:78866904 3rd Qu.:774
Max. :78877444 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:5969 Min. : 5 Min. :-3543.0 Min. :-572
Class :character 1st Qu.: 469 1st Qu.: 177.0 1st Qu.: 848
Mode :character Median :1436 Median : 651.0 Median :1265
Mean :1483 Mean : 669.4 Mean :1256
3rd Qu.:2227 3rd Qu.: 1050.0 3rd Qu.:1620
Max. :7826 Max. : 3091.0 Max. :3917
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. : -38.0 Min. :58 Length:5969 Length:5969
1st Qu.: 424.0 1st Qu.:58 Class :character Class :character
Median : 518.0 Median :58 Mode :character Mode :character
Mean : 586.8 Mean :58
3rd Qu.: 649.0 3rd Qu.:58
Max. :3917.0 Max. :58
summary(data$PEN)
Length Class Mode
5969 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-3543.0 177.0 651.0 669.4 1050.0 3091.0
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
ï..ID LINE SIRE DAM
Min. :97018983 Min. :65 Min. :88153118 Min. :88634709
1st Qu.:97019275 1st Qu.:65 1st Qu.:90086235 1st Qu.:89243141
Median :97805156 Median :65 Median :92013824 Median :91968262
Mean :97443843 Mean :65 Mean :91204041 Mean :91471230
3rd Qu.:97818683 3rd Qu.:65 3rd Qu.:92013824 3rd Qu.:92852992
Max. :97877792 Max. :65 Max. :92913144 Max. :93778605
LITTER PEN FARM ENTRY_TIME
Min. :78509644 Length:5896 Min. :774 Length:5896
1st Qu.:78511461 Class :character 1st Qu.:774 Class :character
Median :78897145 Mode :character Median :774 Mode :character
Mean :78719880 Mean :774
3rd Qu.:78912287 3rd Qu.:774
Max. :78929942 Max. :774
EXIT_TIME STAY_IN FEED_INTK ENTRY_WT
Length:5896 Min. : 5 Min. :-297 Min. : -34
Class :character 1st Qu.: 727 1st Qu.: 319 1st Qu.: 850
Mode :character Median :1446 Median : 664 Median :1194
Mean :1486 Mean : 697 Mean :1195
3rd Qu.:2114 3rd Qu.:1026 3rd Qu.:1539
Max. :6944 Max. :2422 Max. :3049
EXIT_WT FEEDER_NO START_DAY OFFTEST_DAY
Min. :-29.0 Min. :64 Length:5896 Length:5896
1st Qu.:407.0 1st Qu.:64 Class :character Class :character
Median :502.0 Median :64 Mode :character Mode :character
Mean :498.4 Mean :64
3rd Qu.:611.0 3rd Qu.:64
Max. :875.0 Max. :64
summary(data$PEN)
Length Class Mode
5896 character character
summary(data$FEED_INTK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-297 319 664 697 1026 2422
# Convert ANIMAL to a factor (to ensure correct ordering)data$ï..ID <-factor(data$ï..ID)# Create the boxplot with mean and data points for each ANIMALggplot(data, aes(x = ï..ID, y = STAY_IN)) +geom_boxplot(fill ="lightblue", color ="black", outlier.color ="black") +geom_point(size =2, position =position_dodge(width =0.75)) +stat_summary(fun = mean, geom ="point", shape =18, size =3, color ="red", fill ="red") +labs(title ="TIME STAY IN PER ANIMAL IN EACH PEN GROUP",x ="ANIMAL", y ="TIME") +theme(axis.text.x =element_text(angle =45, hjust =1))
The echo: false option disables the printing of code (only output is displayed).