Question: I have three character vectors. List 1 contains all independent names; list 2 and 3 only contain a subset of names in list 1. The names can appear multiple times in the lists 2 and 3. 

```
list1 <- c("Jane","Michael","Zach","Zoey","Mary","Joe","Samantha","Eva","Chris","David","James","Kim","John")
list2 <- c("Jane","Jane","Zoey","Joe","Joe","Samantha","Eva","David","Kim","Kim","Kim")    
list3 <- c("Michael","Michael","Zach","Mary","Mary","Joe","Eva","Eva","Chris","Chris","James","John","John")

```

I would like to obtain a data frame in the end, the first column containing list 1, then the second and third containing the number of times the name in the first list appears in list 2 and 3.

```
Jane    2   0
Mike    0   2
Zach    0   1
Zoey    1   0
Mary    0   2
Joe 2   1
Sam 1   0
Eva 1   1
Chris   0   2
David   1   0
James   0   1
Kim 3   0
John    0   2

```

I know how to do this in Excel, but my list1 has more than 10,0000 entry and it is prohibitively slow if I did this in Excel. Is there any way to do this in R?

Answer: 
You use `setInterval` to execute a function periodically (every 1'000 ms). In the function that you pass to setInterval, you decrement the counter. You check if you have reached 0, and if so, you enable the button (and clear the interval).
Use [.setInterval()](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval) for the countdown.

[Remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute) the [HTML disabled Attribute](https://www.w3schools.com/TAGS/att_disabled.asp) at the end of the countdown.