Efron-1979

This week’s  discussion paper for the PhD Seminar Series in Statistics is Efron, B. (1979). Bootstrap methods: another look at the jackknife. The annals of Statistics, 7(1), 1-26. The reading guide In order to have more fun in the reading, we are aiming to complete  the two tasks before Sunday, Dec 22 . Post at… Continue reading Efron-1979

Source a bunch of files under given folders and/or subfolders

I wrote a function sourceDir() that can source all the functions under given folders and/or subfolders. This function is very much like “Set Path” in Matlab.Please visit this page to obtain the update to dated version. https://github.com/feng-li/flutils/blob/master/sourceDir.R To use it more efficiently, I suggest you put the function at some place, e.g. ~/workspace/R_utils/sourceDir.R, and write… Continue reading Source a bunch of files under given folders and/or subfolders

Published
Categorized as Default, R

How to prevent dropping dimensions in a matrix/array?

When you create a matrix in the usual way like this, > a <- matrix(rnorm(10),2,5) > a        [,1]      [,2]       [,3]       [,4]       [,5] [1,]  1.3488918 0.6225795 -0.7444514  1.3130491  1.7877849 [2,] -0.2385392 0.5656759  0.9037435 -0.2217444 -0.2656875 the dimension dropped after picking up a single row or column in this way, > b <- a[,1] > b… Continue reading How to prevent dropping dimensions in a matrix/array?

Published
Categorized as Default, R