Avid player of RWR here, I've also played Foxhole back when it was free and for comparison:
RWR is definitely easier to get into, and there's practically no communication required, just head to the place where all the other players are. The only exception are stealth maps, of which there is exactly one. It's practically impossible for a newbie to screw up anything because it's mostly a concerted effort of individual players as opposed to actual teamwork.
In Foxhole, there is a big focus on communication, with small squads communicating with their commander and the commander communicating with other commanders and the general. If you don't have voice chat you may want to relegate yourself to maintaining the economy, which can be done with text chat. I personally don't like the mining mechanics, but I hear there are plenty of players that enjoy it.
In combat, RWR is FAR more deadly, every bullet has a kill % chance that decreases with range, and on official servers the bots are set to 98% accuracy. Of course, this works both ways; so you might mag dump into a bot only for it to survive and blow you away with a shotgun from across the screen. The combat here is extremely fast paced, with players either bruteforcing the front lines with special weapons or suppressing and maneuvering. Combat is exceptionally brutal in the Pacific DLC, with bolt-action weapons having 80-100% kill chance and exceptional range and accuracy.
In Foxhole, combat is a combination of both extremes, with the slow, attritional creeping forwards on frontlines and the quick brutal combat when taking a location. Such as when defensive emplacements have to be battered down with mortar before players force their way in. There IS an actual HP system, so when fighting at long range you can still limp back after taking a few hits. The kicker here is that death is a fairly big setback, unlike RWR where it's a slap on the wrist.
As for an individual player's roles, RWR lacks specific roles, but offers a fairly wide range of weaponry and equipment. Support roles are kinda blended in together with secondary consumables with no particular changes in play style.
In Foxhole, player roles are more specialized in more ways than just economy and combat. Medics, Riflemen, Machine Gunners, and other such roles all play entirely differently.
Finally, the AI in RWR is sublime on an individual basis but utterly lacking on the strategic level. The AI is only capable of sending more and more soldiers into the fray in an attempt to overwhelm players with brute force, and is incapable of flanking points that players leave undefended. It's a bit less visible in the Pacific DLC where the maps are more sprawling with capture points often surrounded by multiple capture points instead of the more linear front of Vanilla.
Of course, players in Foxhole are infinitely more crafty than an AI, with enemy squads often sneaking around the front to ambush resource convoys or opening multiple fronts.
Also, don't buy RWR if you want PVP, it's practically non-existant.