Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 2 3 4 5
- 5 3 2 4 6
- 2 3 4 5 21
- 20 2 5 3 2
- library(data.table)
- options(as.data.table=TRUE)
- data <- fread("data.txt", header=FALSE)
- dimnames(data)
- [[1]]
- NULL
- [[2]]
- [1] "V1" "V2" "V3" "V4" "V5"
- dcast(melt(data, id.vars = "col0"), variable ~ col0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement