摘要:
1、测试1 当前目录下文件 > getwd() [1] "C:/Users/75377/Desktop/r_test2" > dir() ## 查看当前目录下文件 [1] "a.txt" > file.exists("a.txt") ## 判断当前目录下是否存在a.txt [1] TRUE > fi 阅读全文
摘要:
1、quantile生成分位数 > data1 <- c(0, 10) > quantile(data1, c(0.2, 0.5)) ## 取0-10 20%和50%点的数值 20% 50% 2 5 > data2 <- c(1, 23) > quantile(data2, c(0.2, 0.5)) 阅读全文
摘要:
1、测试1 直接生成文件 > dir() character(0) > cat("aaa", "bbb", file = "test.txt") ## 直接生成文件 > dir() [1] "test.txt" 2、在文件上追加 > cat("1111", "222", file = "test.t 阅读全文
摘要:
1、R语言中REmap安装遇到如下问题 2、解决方法 install.packages("devtools") library(devtools) install_github("Lchiffon/REmap") 阅读全文
摘要:
1、测试数据 >>> test1 = ["aa", "bb", "aa", "cc", "cc", "dd", "aa"] ## 测试数据 >>> test1 ['aa', 'bb', 'aa', 'cc', 'cc', 'dd', 'aa'] >>> type(test1) <clas 阅读全文
摘要:
1、测试数据 >>> test1 = ["aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh"] ## 测试数据,8个元素 >>> test1 ['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg', 'hh' 阅读全文
摘要:
1、测试文件 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt >1 e r >2 s d >3 i j >4 z c >5 a t >6 e d >7 3 7 >8 z d >9 a c >10 t a >11 a c 2、删 阅读全文
摘要:
1、测试文件及路径 root@PC1:/home/test# ls a.txt gwas.bed test1 test2 root@PC1:/home/test# pwd /home/test root@PC1:/home/test# ll -h total 24K drwxr-xr-x 4 roo 阅读全文
摘要:
1、使用内置函数update合并 >>> dict1 = dict(a = 100, b = 200, c = 300) ## 字典1 >>> dict1 {'a': 100, 'b': 200, 'c': 300} >>> dict2 = dict(d = 400, e = 500, f = 60 阅读全文
摘要:
1、测试数据 root@PC1:/home/test# ls record.txt test.fa root@PC1:/home/test# cat test.fa >OR4F29_ENSG00000284733_ENST00000426406_20_955_995 AGCCCAGTTGGCTGGA 阅读全文