[R] 答复: the bug of function base::order

2014-11-10 Thread S
Oh, Thank you! I made a stupid mistake! -邮件原件- 发件人: ONKELINX, Thierry [mailto:thierry.onkel...@inbo.be] 发送时间: 2014年11月10日 16:03 收件人: 岳�S; r-help@r-project.org 主题: RE: [R] the bug of function base::order No that is not a bug. You are confusing order() with sort(). Please do read

[R] the bug of function base::order

2014-11-09 Thread S
Hi, all: I find a bug of the function base::order. For example, y = rep(9, 9:1); rbind(y,order(y, decreasing=FALSE)); the result is: [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] y998765432 1 1098765431

[R] the values of predict( , type = terms, )

2013-09-17 Thread S
hello all I am really confusing that how predict(,type = terms,) gets the desired result. For example, sample - matrix(nrow = 10, ncol = 2) colnames(sample) - c(y,x) sample[,1] - c(rep(1,times = 5), rep(0,times = 5)) sample[,2] - c(1,1,0,1,1,0,1,0,0,1) sample - as.data.frame(sample)