r - R: How do I plot multiple density plots on one chart, with columns pulled from excel
问题描述
total R/programming newbie here. I'm trying to grab column data (multiple columns) from an excel sheet, create a density plot for each of those columns, and then plot them onto one chart and make it look nice.
The excel data are just columns (colA, colB, colC, etc) with numerical values in them (about 2000 data points per column of data). I've managed to figure out how to plot one column:
library(readxl)
setwd("directoryLocation")
dft <- read_excel("sample.xlsx", sheet="columns")
d <- density(dft$`colA`)
plot(d)
but I'm at a loss on incorporating all the columns. Any ideas on how to proceed (or a better method) would be greatly appreciated. Cheers!
解决方案
推荐阅读
- javascript - REACTJS 中的删除按钮,如何通过 AXIOS 发送值?
- json - flutter - 使用 json 数据
- uwp - 此提交失败,错误代码为 1201 - Microsoft Store 错误
- sql - 使用 concat 生成文件名
- python - 为什么我的精灵以恒定的速度移动
- constants - SystemVerilog 无法识别常量:错误:范围必须由常量表达式限定
- javascript - Svelte - 绑定子组件的属性
- android - 如何使用 Gradle 文件从 Android Google Source 下载源代码
- java-8 - 这是用正确的java8方式编写的吗?
- ansible - 避免剧本中未使用和未定义的变量