head(jobs_on_date)
#gives the 10 newest jobs

library(dplyr)

most_recent10 <- function(df) {
  # Sort the DataFrame by 'modifikationsTimestamp' in descending order and select the top 10
  recent_jobs <- df %>%
    arrange(desc(modifikationsTimestamp)) %>%
    slice_head(n = 10) %>%
    select(aktuelleVeroeffentlichungsdatum, beruf, titel, arbeitgeber)
  
  return(recent_jobs)
}


#use the function
recent_10_jobs <- most_recent10(jobs_on_date)
print(recent_10_jobs)
