The standard principle many of the folks I know use: If a competent leader at the grade would find the crux inadequately protected (e.g. a Factor 2 fall possibility, or ledge out) to prevent serious injury, then it gets an R.
So, if the route is rated 5.4, and the crux is 5.4 and the rest 5.3, then in theory a bolt/good pro at the crux could make the overall danger rating PG, and not R.
If the route is rated 5.4, and the crux is 5.4 with no bolt/good pro anywhere near the crux, then the route should be R, and likely X if no protection anywhere else on the route.
R is often a result of definition by guidebook authors, since it is a descriptor of the relative danger. There isn't an objective "R" standard to appeal to, just many historical uses of the R rating over time. That is still meaningful, but there needs to be some definitional quality communicated first for it to have meaning.