Guest User

Untitled

a guest
Jun 25th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. df <- data.frame(ID = c('SS940426', 'SS940442', 'SS952672'),
  2. Estación = c('200510020012', '200380030004', '200180010105'),
  3. control= c(1, 2, 3),
  4. Peso=c(250,380,410),
  5. campo1= c(520,982,988),
  6. campo2= c(682,987,988),
  7. campo3= c(720,963,999))
  8.  
  9.  
  10. df
  11.  
  12. ID Estacion Control Peso Campo1 Campo2 Campo3
  13. 1 SS940426 200510020012 1 250 520 682 720
  14. 2 SS940442 200380030004 2 380 482 987 993
  15. 3 SS952672 200180010105 3 410 588 688 999
  16.  
  17. ID Estacion Control Peso
  18. 1 SS940426 200510020012 1 250
  19. 2 SS940426 200510020012 2 520
  20. 3 SS940426 200510020012 3 682
  21. 4 SS940426 200510020012 4 720
  22. 5 SS940442 200380030004 1 380
  23. 6 SS940442 200380030004 2 482
  24. 7 SS940442 200380030004 3 987
  25. 8 SS940442 200380030004 4 993
  26. 9 SS952672 200180010105 1 410
  27. 10 SS952672 200180010105 2 588
  28. 10 SS952672 200180010105 3 688
  29. 10 SS952672 200180010105 3 699
  30.  
  31. df1<-melt(DF, value.name = ????, id.vars = c("control","peso")
  32. + variable.name = ????)
Add Comment
Please, Sign In to add comment