Error in melt() : could not find function “melt“
Error in melt(df, id.vars = "MW") : could not find function "melt"
目录
Error in melt(df, id.vars = "MW") : could not find function "melt"
#仿真数据
问题:
解决:
完整错误:
#仿真数据
df <- structure(list(`10` = c(0, 0, 0, 0, 0, 0), `33.95` = c(0, 0,
0, 0, 0, 0), `58.66` = c(0, 0, 0, 0, 0, 0), `84.42` = c(0, 0,
0, 0, 0, 0), `110.21` = c(0, 0, 0, 0, 0, 0), `134.16` = c(0,
0, 0, 0, 0, 0), `164.69` = c(0, 0, 0, 0, 0, 0), `199.1` = c(0,
0, 0, 0, 0, 0), `234.35` = c(0, 0, 0, 0, 0, 0), `257.19` = c(0,
0, 0, 0, 0, 0), `361.84` = c(0, 0, 0, 0, 0, 0), `432.74` = c(0,
0, 0, 0, 0, 0), `506.34` = c(1, 0, 0, 0, 0, 0), `581.46` = c(0,
0, 0, 0, 0, 0), `651.71` = c(0, 0, 0, 0, 0, 0), `732.59` = c(0,
0, 0, 0, 0, 1), `817.56` = c(0, 0, 0, 1, 0, 0), `896.24` = c(0,
0, 0, 0, 0, 0), `971.77` = c(0, 1, 1, 1, 0, 1), `1038.91` = c(0,
0, 0, 0, 0, 0), MW = c(3.9, 6.4, 7.4, 8.1, 9, 9.4)), .Names = c("10",
"33.95", "58.66", "84.42", "110.21", "134.16", "164.69", "199.1",
"234.35", "257.19", "361.84", "432.74", "506.34", "581.46", "651.71",
"732.59", "817.56", "896.24", "971.77", "1038.91", "MW"), row.names = c("Merc",
"Peug", "Fera", "Fiat", "Opel", "Volv"
), class = "data.frame")df
问题:
## Plotting
meltDF = melt(df, id.vars = 'MW')
ggplot(meltDF[meltDF$value == 1,]) + geom_point(aes(x = MW, y = variable)) +scale_x_continuous(limits=c(0, 1200), breaks=c(0, 400, 800, 1200)) +scale_y_continuous(limits=c(0, 1200), breaks=c(0, 400, 800, 1200))
解决:
library(reshape)
library(reshape)## Plotting
meltDF = melt(df, id.vars = 'MW')
ggplot(meltDF[meltDF$value == 1,]) + geom_point(aes(x = MW, y = variable)) +scale_x_continuous(limits=c(0, 1200), breaks=c(0, 400, 800, 1200)) +scale_y_continuous(limits=c(0, 1200), breaks=c(0, 400, 800, 1200))
完整错误:
> meltDF = melt(df, id.vars = 'MW')
Error in melt(df, id.vars = "MW") : could not find function "melt"
> ggplot(meltDF[meltDF$value == 1,]) + geom_point(aes(x = MW, y = variable)) +
+ scale_x_continuous(limits=c(0, 1200), breaks=c(0, 400, 800, 1200)) +
+ scale_y_continuous(limits=c(0, 1200), breaks=c(0, 400, 800, 1200))
Error in ggplot(meltDF[meltDF$value == 1, ]) : object 'meltDF' not found
Error in melt() : could not find function “melt“相关推荐
- melt函数_熊猫的melt()和使用pivot()函数取消融化
melt函数 Pandas melt() function is used to change the DataFrame format from wide to long. It's used to ...
- 【在虚拟环境下完美解决】1698: error: (-215:Assertion failed) empty() in function cv::CascadeClassifier
问题描述 官方文档做的Demo发现遇到了错误提示如下: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifi ...
- cv_bridge与python版本问题导致编译错误error: return-statement with no value, in function returning ‘void*’ [-fpe
1.先说一下报错的过程(着急看解决过程的直接看第二点): 首先,在使用OpenCV时候,报错如下: [ERROR] [1663728000.010723, 6019.022000]: bad call ...
- C语言错误: [Error] called object is not a function or function pointer
[Error] called object is not a function or function pointer //被调用的对象不是函数或函数指针 错误示例: c=5(f-32)/9; 少写了 ...
- error #18 expected a “)”和error #140 too many arguments in function call
1.当宏定义名和函数形参名冲突时,会在函数声明的地方出现错误error #18 expected a ")" 例如:#define SlaveAddress 0xD0 uint8_ ...
- Error in variable_response could not find function “variable_response“
Error in variable_response(explainer_regr_rf, variable = "construction.year", : could ...
- Keil5报错:error: more than one instance overload function “xx“ has C linkage
转自:https://blog.csdn.net/malloc_luo/article/details/104437926 用Keil编写C.C++混编程序碰到了这个问题 #ifdef __cplus ...
- 如何处理error message Invalid parametertype used at function XXXX
Created by Jerry Wang, last modified on Jan 08, 2015 error message如下: debug发现该invalid parameter type ...
- c语言itoa error C4996,warning C4996: 'XXXX': This function or variable ma
[VC]warning C4996: 'XXXX': This function or variable may be unsafe. 关于VS系列使用 Unicode 格式产生以上警告: warni ...
最新文章
- 算术运算中隐式类型转换
- JSP简单练习-一个简单的计数器
- mysql必学十大必会_MYSQL 学习(一)--启蒙篇《MYSQL必知必会》
- python软件_Python软件的下载与安装
- C# 基础,JOject JArray构造json对象
- 计算机网络课程设计 学校园网设计
- VectorDraw机械制图,VectorDraw图形引擎crack版
- C语言生成随机数的方法
- 浅谈对工厂方法模式的理解
- 网络爬虫-爱给音效素材网js逆向思路
- 【JavaEE】电商秒杀项目·第2章·基础项目搭建
- VMware虚拟机屏幕大小(屏幕分辨率)调整
- html5 阿狸照片展示,阿狸手抄报美观简洁图片5张
- java 统计汉字个数_Java简单统计字符串中汉字,英文字母及数字数量的方法
- LeetCode 51-60题
- 【eMMC学习记录】emmc相关名词解释和基础概念
- 罗辑思维八里庄沙龙:Cloud Native 的演进(—)--从零开始了解云原生架构
- Collections常用功能、Set与Map集合
- 2021年JAVA面试~光头佳的论述
- Unity3D游戏作品大盘点
热门文章
- 《人民的名义》如何圈粉“90后”| 大数据舆情分析
- 文科生能学好数据分析吗
- 最易懂的RAID0、RAID1、RAID5、RAID10/01概念解析
- [转]做个男人,做个成熟的男人,做个有城府的男人
- 搭建项目框架时需要考虑的几个问题
- 上证50基金有哪些_上证50指数基金,最全选购攻略
- 应用程序无法正常启动0x000007b,请单击“确定”关闭应用程序(不要着急,先定位问题)
- el表达式截取字符串
- 区块链技术的安全价值与局限性解析
- pap认证过程_PPP中的PAP认证