help with pulling out data

I am trying to pull out data from an excel data sheet in R. The data is organized like a site x species matrix. I would need to select all sites (row names) that contain values greater than 0 for a particular species (column names). But retain the data across all species for the selected sites in my new df. I tried subsetting but couldn't make it work. Thank you!

Hi Frederica, welcome!

We don't really have enough info to help you out. Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

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