Skip to content
Prev 374520 / 398513 Next

Average of results coming from B=100 repetitions (looping)

mean(lst) ### See ?mean. A list cannot be an argument of mean.
lst$mean  ## nonsense! Don't guess -- read the docs.

Here is an an example:
[[1]]
[1] 1

[[2]]
[1] 2

[[3]]
[1] 3

[[4]]
[1] 4

[[5]]
[1] 5
[1] NA
Warning message:
In mean.default(z) : argument is not numeric or logical: returning NA
[1] "list"
[1] 3

Cheers,
Bert




Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Tue, May 8, 2018 at 12:26 PM, varin sacha via R-help <
r-help at r-project.org> wrote: