"Soul" vs "R&B"

Listening to Pandora, I’ve been trying to understand the difference between the Soul and R&B categories.

Help? Ideally with an example or two.

Soul = Gospel with sacrilegious lyrics, e.g., Ray Charles
Rhythm and Blues = boogie/proto-rock and roll with black performers and with a slower beat vs Chuck Berry and Little Richard
R&B - commercial pop targeted to an African-American audience, with a ton of crossover success.

Also, from what I’ve seen, R&B is often used as an all-encompassing category for all African-American oriented music except for jazz and rap/hip-hop.