grouping records sequentially

R programming language resources Forums Statistical analyses grouping records sequentially

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #898
    bigdataguy
    Member

    Hello All,

    I have a dataframe that contains two columns (id (number), has_data(boolean)). Is there a way in R where I can take each 10 records at a time and calculate the percentage of those records containing has_data=true?

    For example,

    records 0,10 contain 3 false , 7 true or 70%

    records 11,21 contain 5 false , 5 true or 50%

    thanks in advance. 

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
Scroll to top
Privacy Policy