上一页 1 ··· 260 261 262 263 264 265 266 267 268 ··· 408 下一页
摘要: 1、测试 ctrl + F6(快捷键) >>> list1 = ["aaa", "bbb", "ccc", "ddd"] >>> list1 ['aaa', 'bbb', 'ccc', 'ddd'] >>> type(list1) <class 'list'> >>> ## 此处执行ctrl + F 阅读全文
posted @ 2022-02-02 21:52 小鲨鱼2018 阅读(228) 评论(0) 推荐(0)
摘要: 1、 > dat1 <- c(3, 1, 4, 7, 6) ## 测试数据1, 未排序 > all(dat1 == sort(dat1)) ## dat1未排序, 判断原始向量和排序后的向量是否一致 [1] FALSE > dat2 <- c(1, 3, 4, 6, 7) ## 测试数据2, 已排序 阅读全文
posted @ 2022-02-01 18:14 小鲨鱼2018 阅读(100) 评论(0) 推荐(0)
摘要: 1、查看内核、系统版本 [root@virtualboxcentos7 test]# hostnamectl Static hostname: virtualboxcentos7 Icon name: computer-vm Chassis: vm Machine ID: e8d08b54fc552 阅读全文
posted @ 2022-02-01 01:31 小鲨鱼2018 阅读(1017) 评论(0) 推荐(0)
摘要: 1、生成矩阵,使用matrix函数 > set.seed(111) ## 设定随机数种子 > vect <- sample(1:10,16, replace = T) > vect [1] 4 3 9 5 3 8 10 1 10 4 8 10 9 8 1 7 > dat <- matrix(vect 阅读全文
posted @ 2022-01-31 19:35 小鲨鱼2018 阅读(2981) 评论(0) 推荐(0)
摘要: 1、测试数据 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt 2 3 5 d a d g v k z c d e q w r i j m n x z v d f g h 2、转换为3列数据 root@PC1:/home/tes 阅读全文
posted @ 2022-01-31 09:06 小鲨鱼2018 阅读(114) 评论(0) 推荐(0)
摘要: 1、测试数据 root@PC1:/home/test2# ls test.txt root@PC1:/home/test2# cat test.txt ## 测试数据 a 3 5 d s g e z 2、sed 实现 root@PC1:/home/test2# ls test.txt root@PC 阅读全文
posted @ 2022-01-30 23:55 小鲨鱼2018 阅读(227) 评论(0) 推荐(0)
摘要: 1、测试数据 root@PC1:/home/test2# ls test.txt root@PC1:/home/test2# cat test.txt a 3 5 d s g e z root@PC1:/home/test2# cat -A test.txt a 3 5 d$ s g e z$ 2、 阅读全文
posted @ 2022-01-30 23:22 小鲨鱼2018 阅读(394) 评论(0) 推荐(0)
摘要: 1、测试数据 root@PC1:/home/test2# ls test.txt root@PC1:/home/test2# cat test.txt ## 测试数据 a 3 5 d s g e z c g w k z c m d 2、xargs实现(数据大时不适用) root@PC1:/home/ 阅读全文
posted @ 2022-01-30 23:11 小鲨鱼2018 阅读(287) 评论(0) 推荐(0)
摘要: 1、sqrt > sqrt(4) ## 4的平方根 [1] 2 > sqrt(9) ## 9的平方根 [1] 3 > sqrt(10) ## 10的平方根 [1] 3.162278 2、log > log(100) ## 以e为底, 100的对数 [1] 4.60517 > log10(100) # 阅读全文
posted @ 2022-01-23 23:29 小鲨鱼2018 阅读(2075) 评论(0) 推荐(0)
摘要: 1、向下取整数floor > a <- 1.1 ## 向下取整数 > floor(a) [1] 1 > a <- 1.9 ## 向下取整数 > floor(a) [1] 1 2、向上取整数ceiling > a <- 1.9 > ceiling(a) ## 向上取整数 [1] 2 > a <- 1. 阅读全文
posted @ 2022-01-23 23:23 小鲨鱼2018 阅读(1469) 评论(0) 推荐(0)
上一页 1 ··· 260 261 262 263 264 265 266 267 268 ··· 408 下一页