Skip to content
Prev 82099 / 398513 Next

Construct a data.frame in a FOR-loop

+ {
+ x[i]<-i^2
+ y[i]<-i^3
+ }
index  x   y
1     1  1   1
2     2  4   8
3     3  9  27
4     4 16  64
5     5 25 125

these can get the data frame.
= = = = = = = = = = = = = = = = = = = =
			


 

2005-12-04

------
Deparment of Sociology
Fudan University

My new mail addres is ronggui.huang at gmail.com
Blog:http://sociology.yculblog.com