I need to select from day 50 to day 100 in a data set.

How do I filter data from day 50 to the last row also filtering the other data I have below?

data8
> truck id  shift 2    day .....
> truck1       1             1
> truck2       1             1
> truck 1      1             2

> shift1 <- filter(data8, shift2== 1) # shift1
> View(shift1)
> )
> 
> Grafico1 <-shift1 %>%                                  #shift1
>   group_by(MAP,TC,truck_id) %>%                         # Agrupado por las variables
>   summarise(Amount= mean(thrash_left_in_all_blocks),# Media de recogida
>             Tiempo = mean(total_time_spend))            # Media de Tiempo total

I would just subset the data before filtering and use the new data set.

data9  <- data8[ 50 : nrow(data8), ]
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.