Hi,
   I am very new to R and I have written the following block of code to
generate a gamma distribution for variable x (which is an array) and a
function "y" whose array values depend on the individual array values of
"x".
The code is as follows:
n=1000
x=rgamma(n,1.5,2)
y=vector("numeric",n)
for (i in 1:n){
y[i]=(2937/50000*exp(-1/1000*x[i])/x[i])
}
now I want to know how I can use "write"/"write.data" or anything similar to
write the output from x[i] and y[i] to two different colums simultaneously
in an output file (say "output.txt").

Thanks in advance,
Arnav

	[[alternative HTML version deleted]]


