[R] creating data.frame from interaction of factors

jiho.han jiho.han at yahoo.com
Thu Feb 15 17:34:05 CET 2007


Hello, R experts-

If I create a new factor, say Z, by combining other factors, say X and Y, is
there ways to create a data.frame from the resulting factor Z? For example,
suppose I enter the following:

X = 1:3
Y = letters[1:3]
Z = interaction( X, Y, sep=":")

Then, I want to get a data.frame that look like 

1 a
2 b
3 c

Help me--- Thanks


-- 
View this message in context: http://www.nabble.com/creating-data.frame-from-interaction-of-factors-tf3234700.html#a8988666
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list