Error in *** : subscript out of bounds

目录

Error in *** : subscript out of bounds

问题:

解决:

完整错误:


问题:

数据越界了啊,除了别介,谁知道那是在哪里?你问内存?内存问谁?

#make this example reproducible
set.seed(0)#create matrix with 10 rows and 3 columns
x = matrix(data = sample.int(100, 30), nrow = 10, ncol = 3)#print matrix
print(x)#attempt to display 11th row of matrix
x[11, ]#attempt to display 4th column of matrix
x[, 4]#attempt to display value in 11th row and 4th column
x[11, 4]

解决:

#

#display number of rows and columns in matrix
dim(x)

#

#display 10th row of matrix
x[10, ]#display number of columns in matrix
ncol(x)#display 3rd column of matrix
x[, 3]#display value in 10th row and 3rd column of matrix
x[10, 3]

完整错误:


> #attempt to display 11th row of matrix
> x[11, ]
Error in x[11, ] : subscript out of bounds

> #attempt to display 4th column of matrix
> x[, 4]
Error in x[, 4] : subscript out of bounds

> #attempt to display value in 11th row and 4th column
> x[11, 4]
Error in x[11, 4] : subscript out of bounds
>

Error in *** : subscript out of bounds相关推荐

  1. C语言错误c216,Keil遇到问题,不会改 TEXT1.C(33): error C216: subscript on non-array or too many dimensions...

    错误类型: 附上源代码~~ //使用AT89C2051单片机,12MHZ晶振,用共阳LED数码管 //P1口输出段码,P3口扫描 #include"reg51.h" #includ ...

  2. subscript on non-array or too many dimensions

    MAIN.C(43): error C216: subscript on non-array or too many dimensions 问题: 重名了

  3. linux mpeg4ip 编译,CentOS6.2下编译mpeg4ip

    一.环境 1.操作系统版本 CentOS 6.2 64位 uname -a的输出: Linux localhost.localdomain 2.6.32-220.17.1.el6.x86_64 #1 ...

  4. R语言chorolayer_R成精系列-R 错误汇总

    Error in solve.default(crossprod(ZBeta)) : Lapack例行程序dgesv: 系统正好是奇异的: U[58,58] = 0 矩阵非满秩,存在逆矩阵的前提是方阵 ...

  5. R语言学习笔记(1)——建立list

    来源:https://www.bilibili.com/video/BV1AW411t76b?p=10 一.什么是list(列表)? 列表的特点是,包含不同类型的数据 二.如何建立list 1.1用* ...

  6. 实验记录 | 6/7 收一下尾巴

    (8:53)到实验室. 首先,检查实验室服务器上是否有安装R. 在命令行中,敲入R bash: R: command not found- 至少未被放入环境变量中.===>此路不通. 其次,将自 ...

  7. CentOS 7.9 编译安装 nbd 模块

    [root@app_5_117 3.10.0-1160.53.1.el7.x86_64]# uname -a Linux app_5_117 3.10.0-1160.53.1.el7.x86_64 # ...

  8. 8.2 喀迈拉(no.11~no.20)

    8.2 喀迈拉(no.11~no.20) 8.2.11 is missing missing or missing?(翻译不了,自己意会吧) 在因子中缺失值当然是有意义的.完全有可能是我们不知道这个特 ...

  9. linux mpeg4ip 编译,CentOS 6.2下编译mpeg4ip

    一.环境 1.操作系统版本 CentOS 6.2 64位 uname -a的输出: Linux localhost.localdomain 2.6.32-220.17.1.el6.x86_64 #1 ...

  10. linux mpeg4ip 编译,[操作系统]CentOS6.2下编译mpeg4ip

    [操作系统]CentOS6.2下编译mpeg4ip 0 2012-06-29 01:00:09 一.环境 1.操作系统版本 CentOS 6.2 64位 uname -a的输出: Linux loca ...

最新文章

  1. tasklist 妙用
  2. AJAX 缓存问题的两种解决方法(IE
  3. postman404报错解决方案
  4. java 隐藏了什么_JAVA程序中封装与隐藏是什么意思
  5. Neurocomputing 投稿注意事项
  6. 从Encoder到Decoder实现Seq2Seq模型
  7. STM32 串口接收流程-串口接收中断
  8. html equls比较方法,编写高质量equals方法
  9. python 批量重命名文件_Python批量重命名文件的方法
  10. 多线程之银行排队叫号系统的实现
  11. .NET-3.Xamarin学习与总结
  12. spss和python什么区别_资深大牛:Python、R语言、SAS、SPSS优缺点比较
  13. 建设银行查看完整卡号
  14. 树莓派外设开发——IIC接口OLED屏幕
  15. 暗黑如何修改服务器爆率,暗黑破坏神百倍爆率补丁
  16. EntityFramework笔记
  17. 想了一个月都不知道如何开始做自媒体
  18. C语言初步-顺序结构-已知三边求三角形面积-海伦公式
  19. 关于eclips的一些使用
  20. Android Framework添加自定义服务和接口

热门文章

  1. bom实现方块移动_js实现方块上下左右移动效果
  2. python提取图片中的文字自动填表,python提取图片中的文字并生成word文档
  3. alertmanager配置详解
  4. ant notification通知框 内容支持html标签
  5. Alertmanager 告警详解
  6. mysql源码分析——THD数据结构
  7. 坚持学下去!转行程序员的2020年度总结
  8. CentOS7内存清理脚本
  9. paddle——站在巨人肩膀上及背刺二三事
  10. Retrofit源码分析