R 使用ggplot2软件包中的qplot函数进行单变量分析 X
试试这个:R 使用ggplot2软件包中的qplot函数进行单变量分析 X,r,ggplot2,R,Ggplot2,试试这个: X <- round(quantile(Retaildata$monthly_salary.x,c(.90,.92,.94,.96,.98,1)),0) Y <- c('P90','P92','P94','P96','P98','P100') library(ggplot2) qplot(x=Y,y=X,label=X,geom = c('text','point'), hjust = -.25) set.seed(1) X set.seed(1) X <- ro
X <- round(quantile(Retaildata$monthly_salary.x,c(.90,.92,.94,.96,.98,1)),0)
Y <- c('P90','P92','P94','P96','P98','P100')
library(ggplot2)
qplot(x=Y,y=X,label=X,geom = c('text','point'), hjust = -.25)
set.seed(1)
X
set.seed(1)
X <- round(quantile(abs(rnorm(1000))*12500,c(.90,.92,.94,.96,.98,1)),0)
Y <- c('P90','P92','P94','P96','P98','P100')
# 'mixedsort' orders character strings containing embedded numbers so that
# the numbers are numerically sorted rather than sorted by character value
library(gtools)
Y <- factor(Y, levels=mixedsort(Y))
library(ggplot2)
qplot(x=Y,y=X,label=X,geom = c('text','point'), hjust = -.25)