R: Count items in a nested list -


How do you count items in a nested list efficiently? For example, my title is a list of names:

  header.names & lt; - Listings ("Post Unique References", "Name", "Grade (or Equivalent)", "Date", "Date"), List ("Name", "Organization", "Unit", "Senior Reporting "," Grade "," date "))   

I want to calculate the number of times a header is generated

can be a simple approach

  is required (str_count (str_count (unlist (header.names), "date"))   

though:

  • "Name" should be a count of 2.
  • The count of "date" should also be generated 2 because every list is counted once.
  • The count "grade" should yield 1 - how does a non-exact search look like it produces 2?

    Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -