Results for query "Numeric"

Why replicate() doesn't produce numeric output in R?

I'm wondering, however, why my replicate() command doesn't produce a numeric table?Here is the table that I get:

Df Sum Sq Mean Sq F value Pr(>F)
[1,] Integer,2 Numeric,2 Numeric,2 Numeric,2 Numeric,2
[2,] Integer,2 Numeric,2 Numeric,2 Numeric,2 Numeric,2
[3,] Integer,2 Numeric,2 Numeric,2 Numeric,2 Numeric,2
[4,] Integer,2 Numeric,2 Numeric,2 Numeric,2 Numeric,2
[5,] Integer,2 Numeric,2 Numeric,2 Numeric,2 Numeric,2


The output is a list if we look at the str

str(replicate(5, fun()))


The replicate also have an option to return a list instead of simplifying it to matrix

lst <- replicate(5, fun(), simplify = FALSE)
do.