Matchmaker, Matchmaker, make me a match (we won't be finding a Find or catching a tryCatch, though)

This is part two of a multi-part series of implementing some interesting R functions. Part one can be found here.

The task:

You are to implement R's match function in as few bytes as possible.

Input:


x, a possibly empty list/array of integers
table, a possibly empty list/array of integers
nomatch, a single integer value
incomparables, a possibly empty list/array of integers


Output:


a single array/list of integers O of equal length to x, where each value O[i] represents either:


The index j of the first value in table where table[j]==x[i]
nomatch, indicating that no value in table is equal to x[i] OR that x[i] is in the list of incomparables.



Test Cases

All in the form x, table, nomatch, incomparables -> output
outputs 

[], [1,2,3], 0, [5] -> []

[1, 2, 3], [], 0, [5] -> [0, 0, 0]

[9, 4, 3, 6, 3], [9, 8, 7, 6, 5, 4, 3, 2, 1], -1, [4] -> [1, -1, 7, 4, 7]

[8, 6, 7, 5, 3, 0, 9], [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6], 1000, [1] -> [12, 8, 14, 5, 1, 1000, 6]


More test cases can be generated as needed.

Additional rules:


R has 1-based indices, but a consistent alternative-based indices are acceptable. So you can use indices that start at 3 or 17 or whatever, but this must be consistent, and you must indicate this in your answer.
If you chosen language has a builtin that does this, please also implement your own solution.
Explanations are appreciated.


This is code-golf, so shortest solution in bytes wins!
Jelly, &nbsp;10&nbsp; 8 bytes

-2 thanks to Erik the Outgolfer

,⁷y⁵iⱮ⁶o


A full program accepting four command line arguments, incomparables nomatch table x which prints a Jelly representation* of the list of R's match function results.

Try it online!

How?

e.g. with incomparables nomatch table x = [1,4], 2, [2,4], [4,3,2,1,0]:

,⁷y⁵iⱮ⁶o - Main Link: list, incomparables; list, nomatch
 ⁷       - newline character                                '\n'
,        - pair (incompararables) with (right)              [[1,4],'\n']
   ⁵     - 5th argument (3rd input = table)                 [2,4]
  y      - translate (right) with lookup (left)             [2,'\n']             
      ⁶  - 6th argument (4th input = x)                     [4,3,2,1,0]
     Ɱ   - map with:
    i    -   first index of (right) in (left)               [0,0,1,0,0]
       o - logical OR                                       [2,2,1,2,2]




* An empty list is represented as nothing, a list of lenth one is represented as just the item, while other lists are enclosed in [] and delimited by ,