tôi nhận được lỗi này:bất ngờ 'khác' trong "khác" lỗi
Error: unexpected 'else' in " else"
Từ tuyên bố if, else
này:
if (dsnt<0.05) {
wilcox.test(distance[result=='nt'],distance[result=='t'],alternative=c("two.sided"),paired=TRUE) }
else {
if (dst<0.05) {
wilcox.test(distance[result=='nt'],distance[result=='t'],alternative=c("two.sided"),paired=TRUE) }
else {
t.test(distance[result=='nt'],distance[result=='t'],alternative=c("two.sided"),paired=TRUE) } }
Điều gì là sai với điều này?
Câu lệnh if của bạn hoàn thành. Di chuyển dấu ngoặc nhọn ở cuối của nó đến đầu dòng thứ 3. Làm tương tự cho ngày 5. –
Có thể trùng lặp của http://stackoverflow.com/questions/13724063/if-else-constructs-inside-and-outside-functions –