-
Smoothing or moving average use ksmooth …
Az Zubayr Smoothing or moving average use ksmooth() when kernel is “box”, it is the same as moving average by filter() except that ksmooth() can handle the edges better. Example ksmooth(data, kernel = “box”, bandwidth = 3)
-
Great illustration of plot and margin in …
incontri per adulti ferrara Great illustration of plot and margin in R http://research.stowers-institute.org/efg/R/Graphics/Basics/mar-oma/index.htm
-
2nd axis in R Use axis. side is where t …
2nd axis in R Use axis. side is where the second axis goes. Side 3 is the top x-axis. Side 4 is the right y-axis. With put the 1st axis thick for the at and lab is for the text. Here is the example. axis(side=3, at = c(0.1, 0.2, 0.3, 0.4, 0.5), lab = c(10,…
-
When the forward search of readline is n …
When the forward search of readline is not working. $ stty -a $ stty -ixon
-
yank and put (copy and paste) between tw …
yank and put (copy and paste) between two gVim Use * instead of + e.g. yank: *y cut: *x put: “*gP On the other hand, use + to copy and paste to other programs yank: +y cut: +x paste: “+gP
-
Add comments on a mysql table CREATE …
Add comments on a mysql table CREATE TABLE testing ( name VARCHAR(5) ) COMMENT=’this is testing’; How to view the comment: Or add comments after making a table by ALTER TABLE tablename COMMENT = ‘new updated comment’; To see the comments SHOW CREATE TABLE testing; Source
-
Setting a scale in ggplot2 scale_y_cont …
Setting a scale in ggplot2 scale_y_continuous(limits = c(10, 200))
-
Moving average in R Median: runmed() M …
Moving average in R Median: runmed() Mean: filter() ex) runmed(data, 3) filter(data, rep(1/3, 3))
-
Save ggplot in pdf Use dev.copy2pdf(fil …
Save ggplot in pdf Use dev.copy2pdf(file=”plot.pdf”) Example) plotA
-
# Running R in batch mode R CMD BATCH R …
# Running R in batch mode R CMD BATCH Rscript.R