-
Retrieving rda into a different variable name in…
http://olhg45.fr/wp-content/uploads/2016/11/Planning-Tournoi-U9-Orleans-05.11.16.pdf Retrieving .rda into a different variable name in R 1. Using environment x
-
Convert a list of data frame into a…
http://olhg45.fr/?kaption=iq-elite-site-de-rencontre&7e5=33 Convert a list of data frame into a data frame ldply in plyr package did awesome job. I have a list with different length of data. I’d like to convert the list to a data frame with the name of the each list showing as a column. Then I can do grouping the data. Here…
-
Do NOT use 1 length x in for…
Do NOT use 1:length(x) in for statement in R. Because when x is empty, the loop will run over 1:0, which is twice. > y length(y) [1] 0 > for (i in 1:length(y)) { print(“y”)} [1] “y” [1] “y” > for (i in 1:seq(along=y)) { print(“y”)} Error in 1:seq(along = y) : argument of length…
-
with within and transform in R I found…
with, within, and transform in R. I found that they are useful to deal with data set. I don’t quite understand the explanation in the help page and I can’t not guarantee the correctness of my explanation so I provide some examples to show their behavior. Fist of all, they need data frame or list…
-
Reverse search in RStudio Type part of a…
Reverse search in RStudio Type part of a command and Ctrl-Up arrow will show the previous commands history.
-
Use t using apply to apply a non…
Use t() using apply() to apply a non-aggregate function on a matrix row wise because column wise is the default order of matrix in R. Example. I’d like to reverse the order of elements in each row. > test.m test.m [,1] [,2] [,3] [,4] [,5] [1,] 1 5 9 13 17 [2,] 2 6 10…
-
Some Vim commands related to buffers Show buffer…
Some Vim commands related to buffers Show buffer list :ls Change to another buffer – any of these commands :bn :bp :b Ctrl-6 Close current buffer :bd
-
Rotate open windows in Vim Ctrl w r
Rotate open windows in Vim Ctrl-w r