[R] outputting (writing) output into a dataframe

Farrel Buchinsky fjbuch at gmail.com
Tue Oct 28 22:16:57 CET 2008

I have solved this problem once before but don't recall exactly how.
Is there a url that shows how?

What I want to do now is quite specific but my query is actually very general

There are many functions in which one specifies several parameters and
an output is generated. Well what happens if one wants to specify a
range of parameters and have the output written to a data frame.

To demonstrate:

p1 <-15:25/100# so that I can vary the p1 from 0.15 to 0.25

for (i in p1)  print(power.prop.test(p1=i,p2=0.5*i,power=0.8, sig.level=0.05))

That prints a whole flurry of pretty outputs but I actually want it to
output into a data frame so that I can plot it?

Farrel Buchinsky

More information about the R-help mailing list