4. Given $O$ is the origin, point $A$ in the first quadrant lies on the graph of the inverse proportion function $y=\frac{1}{x}(x>0)$, and point $B$ in the second quadrant lies on the graph of the inverse proportion function $y=-\frac{4}{x}$ $(x<0)$, and $O A \perp O B$. Then the value of $\tan \angle A B O$ is $(\quad)$.
(A) $\frac{1}{2}$
(B) $\frac{\sqrt{2}}{2}$
(C) 1
(D) 2
4. A.

Draw $A C \perp x$-axis at point $C$, and $B D \perp x$-axis at point $D$.
From $O A \perp O B$, we get $\angle A O B=90^{\circ}$.
Thus, $\triangle A O C \backsim \triangle O B D$.
Therefore, $\tan \angle A B O=\frac{O A}{O B}=\sqrt{\frac{S_{\triangle A O C}}{S_{\triangle O B D}}}$
$=\sqrt{\frac{O C \cdot A C}{O D \cdot B D}}=\sqrt{\frac{\left|x_{A} y_{A}\right|}{\left|x_{B} y_{B}\right|}}=\sqrt{\frac{1}{|-4|}}=\frac{1}{2}$.