Fairly new to the R studio area (especially when it comes to loop commands)
Was wondering if someone can help me with a small problem.
I have a large file (800,000 rows). Data is vertical so each row represents an individual (personcode)
each row has a startdate and an end date.
There is an event which occurs for some individuals. Im trying to figure out the easiest way if the outcome happened between any of the start date/end date.
Person 1 the event happened for that individual (in the second row) so the event would be a Yes. Person 2 never had an event. Person 3 had an event but they did not occur between any of the start and end dates for the individual. (I guess ideally a new column is created with Y or N to see if it matches my interest).
Can anyone direct me to a resource or a previous post which would help me with this problem?