无法在 R 中绘制箱线图中的所有数据
Cannot plot all data in box-plotting in R
我想画一个箱形图。我有 1000 多行,但是当我绘制它们时,它只显示了几个条目。
Dataset:
https://www.dropbox.com/s/tgaqfgm2gkl7i3r/maintenance_data_updated.csv
#Start of Box plot Temperature
training_data <- read.csv("C:/Users/akhan/Documents/maintenance_data_updated_2.csv", stringsAsFactors = TRUE)
library(dplyr)
dt_temperature <- select(training_data, Runtime, Defect, Machine, Temperature, Plant)
dt_temperature$Machine_Plant = paste(dt_temperature$Machine,dt_temperature$Plant,sep = "_")
attach(dt_temperature)
class(Temperature)
class(Defect)
class(Runtime)
class(Machine)
?boxplot
boxplot(Temperature ~ Machine_Plant)
Current output: https://www.dropbox.com/s/7nv5n80en1vpkyt/Rplot01.png
任何人都可以提示解决方案是什么吗?
你说 'it shows only a few entries' 是什么意思?如果您的问题是关于在 X 轴上仅注释 4 个箱线图,解决方案可能是这样的:
boxplot(Temperature ~ Machine_Plant, las=3)
类型
?par
有关 las
参数的更多信息。
我想画一个箱形图。我有 1000 多行,但是当我绘制它们时,它只显示了几个条目。
Dataset: https://www.dropbox.com/s/tgaqfgm2gkl7i3r/maintenance_data_updated.csv
#Start of Box plot Temperature
training_data <- read.csv("C:/Users/akhan/Documents/maintenance_data_updated_2.csv", stringsAsFactors = TRUE)
library(dplyr)
dt_temperature <- select(training_data, Runtime, Defect, Machine, Temperature, Plant)
dt_temperature$Machine_Plant = paste(dt_temperature$Machine,dt_temperature$Plant,sep = "_")
attach(dt_temperature)
class(Temperature)
class(Defect)
class(Runtime)
class(Machine)
?boxplot
boxplot(Temperature ~ Machine_Plant)
Current output: https://www.dropbox.com/s/7nv5n80en1vpkyt/Rplot01.png
任何人都可以提示解决方案是什么吗?
你说 'it shows only a few entries' 是什么意思?如果您的问题是关于在 X 轴上仅注释 4 个箱线图,解决方案可能是这样的:
boxplot(Temperature ~ Machine_Plant, las=3)
类型
?par
有关 las
参数的更多信息。