Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reading p-values from a txt file

Status
Not open for further replies.

devarshi77

Programmer
Oct 31, 2004
10
US
hi!!
im new here and need some guidance as i dont wan swim any longer!
the problem is that i have created a file in S plus 2000 and i want to read p-values from the file. the file has 1000 simulations. someone told me that c can do it effortlessly.
this is the final aim of the project im workin on:

i wan to read the file and give me the list of p-values smaller than 0.05 .


the file output looks like this (1000 such observations) :
------
One sample Kolmogorov-Smirnov Test of Composite Normality

data: y
ks = 0.1062, p-value = 0.5
alternative hypothesis: True cdf is not the normal distn. with estimated parameters
sample estimates:
mean of x standard deviation of x
0.7940168 0.8786753
------------

the syntax im trying to use in S plus loks like this (if anyone has any idea as to how te syntax works n if its at all right then pls let me know)

scan(file="", what=numeric(), n=<<see below>>, sep=<<see below>>,
multi.line=F, flush=F, append=F, skip=0, widths=NULL,
strip.white=<<see below>>)

-------------

if anyone can show me a way out of this, i d appreciate.

best
dev
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top