в начале R может быть немного сложно понять, вот как я бы сделал это в базе R
#your data
run_num <- c(1,1,1,1,1,1,49,49,49,49,49,49)
timestep <- c(0,1,2,3,4,5,13728,13729,13730,13731,13732,13733)
phys_length <- c(0.000000000,0.008209734,0.016332967,0.024238314,0.031594308,0.033077672,15.04109,15.04111,15.04112,15.04113,15.04114,15.04115)
eggs <- c(0,0,0,0,0,0,727,727,727,727,727,727)
params <- as.data.frame(cbind(run_num,timestep,phys_length,eggs))
#this line returns a vector of True and False we can use this to grab all the rows where the statement is true
params$eggs == 0
#like here "params[,]" is your whole data frame, and in the "[,]" the first value is row number, and second is colunm number
#if set like below it returns all rows that were true, and since the second value was empty it returns all columns
no_eggs <- params[params$eggs == 0,]
Обновление: это даст вам номера запусков, которые производят яйца,
#find all runs with eggs
eggs <- params[params$eggs != 0,]
# grab run number and make it unique
run <- unique(eggs[1])
#return all rows that result in runs with eggs greater than 0
cleaned_df <- params[eggs$run_num == run,]