Description Usage Arguments Value Author(s) Examples

Sees if you have a pair, and if so, finds the strength of your hand. Used by handeval().

1 | ```
onepair1(x)
``` |

`x` |

returns 15*15*15*pair + 15*15*next + 15*next + next if you have a pair, or 0 otherwise.

Frederic Paik Schoenberg

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function(x){
## 15*15*15*pair + 15*15*next + 15*next + next
a1 = unique(x)
a2 = length(a1)
if(a2 == length(x)) return(0)
a3 = rep(0,a2)
for(i in 1:a2) a3[i] = sum(x == a1[i])
a4 = max(a1[a3>1.5])
a5 = sort(c(x[x != a4],rep(0,3)),decreasing=T)
15*15*15*a4 + 225*a5[1] + 15*a5[2] + a5[3]
}
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.