Solution

> D1 <- data.frame(inc=c(2000,1000),age=c(50,25),kids=c(2,1),edu=c(12,16),row.names=c("Alex","Vlado"))
> D1
       inc age kids edu
Alex  2000  50    2  12
Vlado 1000  25    1  16
> D2 <- data.frame(ball=c(0,1),tenis=c(1,0),golf=c(0,0),ski=c(1,1),hike=c(0,1),row.names=c("Alex","Vlado"))
> D2
      ball tenis golf ski hike
Alex     0     1    0   1    0
Vlado    1     0    0   1    1



Back to Data frames

ru/7iss/labs/s/s2.txt · Last modified: 2017/06/19 11:52 by vlado
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki