Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73301

generating a variable for counting average entries

$
0
0
Hi all, I had a small coding problem and was wondering if you can help me with it.
I have the following data for workers and the entries they make. Each date is an entry
Worker date
worker_name1 11sep2022
worker_name1 11sep2022
worker_name1 12sep2022
worker_name1 15sep2022
I want to create a variable that counts the number of entries by each worker for the same day and another variable that gets the average entry per day so that :
worker date no. of entries
worker_name1 11sep2022 2
worker_name1 12sep2022 1
worker_name1 15sep2022 1
-------------------------------------------------------------------------------------------------------------------------------
worker average_entries per day
worker_name1 1.3
Thank you in advance

Viewing all articles
Browse latest Browse all 73301

Trending Articles



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