我正在通过PDF文件学习R,偶然发现了我不理解的顺序代码。请解释它的作用。
> summary(hg)
Group.Name Species Distance Number
First:46 thomsonsgazelle:31 Min. : 15.0 Min. : 1.00
Last :69 warthog :49 1st Qu.:110.0 1st Qu.: 1.00
zebra :35 Median :180.0 Median : 2.00
Mean :197.8 Mean : 3.67
3rd Qu.:265.0 3rd Qu.: 4.00
Max. :500.0 Max. :22.00
newdata <- data.frame(Group.Name = rep("First", 300), Species = rep(c("thomsonsgazelle", "warthog", "zebra"), each = 100), Number = rep(seq(min(hg$Number), max(hg$Number), length = 100), times = 3))
我不理解的主要代码是“ seq(min(hg$Number), max(hg$Number)
”。它会产生一列我不理解的数字。