Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205372

count of entries of XXXX post inquiry date of ABC using group,count and loop in R

$
0
0

I am intended to list-out count of all ID's who have inquired post inquiring ABC(where XXXX means other companies). Sample table is given below:

     ID            Company  INQUIRY-DATE
    A15217177635833 XXXX    25-08-2018
    A15217177635833 ABC     28-06-2018
    A15217177635833 XXXX    05-05-2018
    A15217177635833 XXXX    28-05-2019
    F15039820795577 ABC     22-08-2017
    F15039820795577 XXXX    15-06-2017
    F15039820795577 XXXX    15-08-2018
    F15039820795577 XXXX    25-08-2018
    F15039820795577 XXXX    15-08-2018

Expected Output:

     ID             Count 
    A15217177635833 2
    F15039820795577 3

That means all entries of XXXX post inquiry date of ABC. I am trying to group, arrange and count the rows but not exactly able to make logic.


Viewing all articles
Browse latest Browse all 205372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>