当前位置:网站首页>R错误:缺少值不允许写在下面的作业的数据帧
R错误:缺少值不允许写在下面的作业的数据帧
2022-07-29 13:57:00 【qq_21478261】

Simulate an error occurs:
#生成一个data.frame
set.seed(0)
data <- data.frame(x=c(NA, rnorm(99)), y=c(1:5))
head(data)生成一个6x2的data.frame,包含一个NA值,
,
#将data.frame中小于0的值替换为0
data[data$x<0,]$x <- 0An error occurred:
Error in `[<-.data.frame`(`*tmp*`, data$x < 0, , value = list(x = c(0, :
missing values are not allowed in subscripted assignments of data frames
报错很明显,da
边栏推荐
- 每日优鲜解散疑云:生鲜电商们苦渡生死劫
- The core principles of electronic games
- 详述 TCP 的 TIME_WAIT 状态要维持 2MSL 的原因
- 小程序开发模板设计怎么做?
- BGP联邦综合实验
- Sentinel 2A data preprocessing and calculation of six common vegetation indices in snap software
- JUC阻塞队列-ArrayBlockingQueue
- DVWA full level customs clearance tutorial
- conda环境创建及复制
- 用支持LaTex的Markdown语句编辑一个数学公式
猜你喜欢
随机推荐
一起来侃个球
基于对象的实时空间音频渲染丨Dev for Dev 专栏
图解 Attention(完整版)!
JUC阻塞队列-ArrayBlockingQueue
大一(下)暑假作业
[网鼎杯 2020 半决赛]AliceWebsite
The whole process of installing Oracle database on CentOS7
期货合约知多少
开关电源-LLC基本原理
「 工业缺陷检测深度学习方法」最新2022研究综述
SIP system composition format
常坐飞机的你,为什么老惦记着“升舱”?
何享健“A拆A”又败一局,美的旗下美智光电终止创业板IPO
来自 Qt 官网的呐喊
HMS Core音频编辑服务音源分离与空间音频渲染,助力快速进入3D音频的世界
程序员是职业病高发群体,别天真的以为只有秃头那么简单,才不是呢。
PAT 甲级 A1021 Deepest Root
关闭线程池 shutdown 和 shutdownNow 的区别
Research on the thinking and application methods of the frontier of ESI research
Bika LIMS 开源LIMS集—— SENAITE的使用(用户、角色、部门)









