This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### assuming the test.tab have this structure | |
# hello | |
# ! This is comment | |
# # This is also a comment | |
# 1 | |
# 2 | |
# 3 | |
read.table(text=sub(paste0("[!#]", ".*"), "", readLines("test.tab")), header=TRUE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testarray <- array(1:6, c(2,3)) | |
dimnames(testarray) <- list(c("a", "b"), c("d", "e","f")) | |
testarray | |
dimnames(testarray) <- list(c("H", "K"), c("R", "U","G")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# combining list of data frames | |
irisBroken <- list(iris[1:10,], iris[11:30,]) | |
do.call(rbind, irisBroken) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tokens freq | |
的 366981 | |
一 232555 | |
年 229119 | |
人 190091 | |
有 189779 | |
會 160113 | |
日 144340 | |
月 135667 | |
港 132770 |
NewerOlder