I have a list of about 10 dataframes (a bunch of tabular data). I simply want to remove some rows and columns from all of the dataframes using my list. The name of my list is list_schooldata. How can I remove the first 50 rows from all the dataframes within list_schooldata
Here's one option: If we have a single data frame, we can do, for example, iris %>% slice(-(1:50)) or iris[-(1:50), ], to remove the first 50 rows. For data frames in a list, we can use map() to apply the same approach to every data frame in the list.
Thank you! That seemed to work. What if I wanted to now remove columns from the list, but specific columns (for example, columns 1, 5, 6, and 8)? Would I also use map()?