Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. lhs1=c("A","D","C","B")
  2. lhs2=c("B","A","C","I")
  3. lhs3=c("I","B","A","D")
  4. lhs4=c("A","C","B","D")
  5.  
  6. df <- data.frame(lhs1,lhs2,lhs3,lhs4)
  7.  
  8.  
  9.  
  10. lhs1 lhs2 lhs3 lhs4
  11. 1 A B I A
  12. 2 D A B C
  13. 3 C C A B
  14. 4 B I D D
  15.  
  16. category <- c("A","B","C","D","E","I")
  17. sale <- c(12,23,34,35,38,42)
  18. look <- data.frame(category,sale)
  19.  
  20. category sale
  21. A 12
  22. B 23
  23. C 34
  24. D 35
  25. E 38
  26. I 42
  27.  
  28. lhs1 lhs2 lhs3 lhs4 lhs1.sale lhs2.sale lhs3.sale lhs4.sale
  29. A B I A 12 23 42 12
  30. D A B C 35 12 23 34
  31. C C A B 34 34 12 23
  32. B I D D 23 42 35 35
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement