【资料图】
title: "作图时行列名中包含空格的处理方法"
output: html_document
date: "2023-03-14"
library(ggplot2)dat <- iriscolnames(dat)[1] <- "a b"ggplot(dat,aes(a b,Sepal.Width))+ geom_point()
## Error: :4:18: unexpected symbol## 3: colnames(dat)[1] <- "a b"## 4: ggplot(dat,aes(a b## ^
library(ggplot2)dat <- iriscolnames(dat)[1] <- "a b"ggplot(dat,aes(`a b`,Sepal.Width))+ geom_point()
引用自生信技能树
X 关闭
Copyright © 2015-2032 华西纸业网版权所有 备案号:京ICP备2022016840号-35 联系邮箱: 920 891 263@qq.com