我是从csv中的一列做直方图,值从10万到10,000,000不等,但是当我把数据转换成r,并从那一列生成直方图时,x轴就会混乱,当最大值为10,000,000时,显示出非常大的范围。
这是数据集的来源:https://www.kaggle.com/kmldas/hr-case-study
这是我用来制作直方图的代码:
hist(study_sample$Annual.Salary)

发布于 2021-07-20 20:25:48
您可以禁用R中的科学表示法:
options(scipen = 999)
hist(HR_Case_Study$`Annual Salary`)

数据主管:
structure(list(Name = c("Aarti Panchal", "Aastha Behl", "Abhinaw Sinha",
"Abhishek Dabb", "Abhishek Kumar Preetam", "Addi Studdeard"),
Gender = c("Female", "Female", "Male", "Male", "Male", "Female"
), Department = c("CEO", "Sales", "Engineering", "Legal",
"Support", "Support"), `Annual Salary` = c(10000000, 880500,
682200, 563700, 1070900, 1084500), Location = c("Mumbai",
"Bengaluru", "Bengaluru", "New Delhi", "New Delhi", "Mumbai"
), Rating = c("Very Good", "Very Good", "Good", "Very Good",
"Poor", "Poor"), `Distance to Office` = c(25, 7, 15, 5, 10,
6), Age = c(31, 40, 28, 39, 26, 38), `Tenure in Company` = c(10.4,
18.2, 6.6, 13.3, 4.8, 6.7)), row.names = c(NA, -6L), class = c("tbl_df",
"tbl", "data.frame"))https://stackoverflow.com/questions/68460828
复制相似问题