1
데이터 프레임 grades_software
, software
과 상자 플롯을 개별 변수 X (R/SPSS) 나는 또한 코드에서 breaks = seq
및 limits
퍼팅의 기능이 무엇을 몰랐R ggplot boxplot 오류 : 미관은 길이 1 또는 데이터 (100)와 같아야합니다. x, y
library(ggplot2)
ggplot(grades_software, aes(software, grades_software$final_score)) +
geom_boxplot(fill = fill, colour = line) +
scale_y_continuous(name = "final_score",
breaks = seq(0, 175, 25),
limits=c(0, 175)) +
scale_x_discrete(name = "software") +
ggtitle("Distribution of Final Course Scores by Software Used")
: 및 grades
같은 연속 변수 Y. 나는 다음과 같은 코드를 사용했다.
안녕하세요. 오신 것을 환영합니다. 위대한 R 재현 가능한 예제를 만드는 방법에 대해서는 [여기] (https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610)를 읽으십시오. – JustCurious
'aes (software, grades_software $ final_score)'를'aes (software, final_score) '로 바꾸어보십시오. 데이터 프레임이 이미 지정 되었기 때문에 'aes'내에 열 이름 만 지정하면됩니다. – Ashish