title: R: Filtering rows by “contains” text within row names
body: <p>I am working with the mtcars dataset in R. My assignment is to print the rows corresponding to Honda and Toyota cards using knitr::kable(). I was directed to this for help: <a href="https://r4ds.had.co.nz/r-markdown.html#table" rel="nofollow noreferrer">https://r4ds.had.co.nz/r-markdown.html#table</a></p>
  <p>However that section only talks about printing the first 5 rows of the dataset, not about filtering it at all. I clicked to read more about the function but it was all foreign to me.</p>
  <p>The best I can tell is that the make and model of the cars are the row names. So I need to filter the results to print only rows whose names contain “Honda” or “Toyota” and I need to do it using knitr::kable().</p>
  <p>I have tried creating subsets, but unsure how to do so using row names. Also wouldn’t know how to search whether the row names contain the text “Honda” or “Toyota”.</p>
  <p>This is my first day working with R and my only coding experience before today was some C# two+ years ago. This is just very frustrating to me because I could do this in Excel in less than 30 seconds. But R is like a foreign language and I don’t feel like the section of my textbook I was referred to explained the problem - especially for a brand new coder (and this class isn’t supposed to require any experience) . Appreciative of any help I can get!</p>