Skip to content
Prev 362984 / 398498 Next

store result of loop in df

What's wrong with:

result <- with(df, x/n)  ? Do I misunderstand?

(and what's the p = .065 or [[1]] have to do with the estimated prob,
as you are not actually doing any test?)

Finally, if you really do this sort of thing, ?mapply (and ?with) can
be useful; e.g. you could have rewritten your loop as:
probability of success probability of success probability of success
            0.45454545             0.16000000             0.04166667
probability of success probability of success
            0.15000000             0.28333333


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 Fri, Jul 29, 2016 at 1:52 AM, Alain D. via R-help
<r-help at r-project.org> wrote:
Message-ID: <CAGxFJbTgnC5asgTk6b=rXyDKJXHJLdveP32rsLug+TyBeEywMA@mail.gmail.com>
In-Reply-To: <1558342546.632945.e1cc5721-5916-4f10-b14f-1f6ef4b3b2b4.open-xchange@com4.strato.de>