+3 votes
in Programming Languages by (3.1k points)

The predicted probabilities of data have named values. How can I get the numbers from the named numbers?

       99991        99992        99993        99994        99995        99996

4.776182e-02 6.101955e-02 2.911758e-06 1.066163e-03 2.888352e-06 6.658352e-03

       99997        99998        99999

1.829283e-05 1.682638e-04 4.375065e-03

1 Answer

0 votes
by (29.3k points)

You can use the function unname() to extract a number from a named number.

E.g. If the variable "preds" has named numbers, you can do the following to get numbers.

preds = unname(preds)

Related questions

+1 vote
1 answer
+2 votes
1 answer
+1 vote
1 answer
...