RobinHankin / hyper2

https://robinhankin.github.io/hyper2/
5 stars 3 forks source link

Infelicity in rp() #187

Closed RobinHankin closed 1 year ago

RobinHankin commented 1 year ago

I find myself doing things like this over and over again:

> x <- rp(10,chess)
> x <- cbind(x,1-rowSums(x))
> colnames(x) <- pnames(chess)
> x
        Topalov     Anand    Karpov
 [1,] 0.3333333 0.3333333 0.3333333
 [2,] 0.3333333 0.3333333 0.3333333
 [3,] 0.3333333 0.3333333 0.3333333
 [4,] 0.3333333 0.3333333 0.3333333
 [5,] 0.3333333 0.3333333 0.3333333
 [6,] 0.3372973 0.3665372 0.2961655
 [7,] 0.3730794 0.3263499 0.3005707
 [8,] 0.3602142 0.3330759 0.3067100
 [9,] 0.3906635 0.3034338 0.3059027
[10,] 0.4046627 0.4191198 0.1762176
> 

It would be so good to have an option in rp() to avoid this.