How can I exclude directories from grep -R?

How can I exclude directories from grep -R?

‘–exclude-dir=dir’ Exclude directories matching the pattern dir from recursive directory searches.