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

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -