Category: status

  • R normality tests shapiro.test() his …

    femme rencontre internet R normality tests

    shapiro.test()

    hist(data, prob=TRUE)
    lines(density(data))

    qqnorm(data)
    qqline(data)

  • Multi plots in a page gridExtra package …

    Multi plots in a page
    gridExtra package makes it easier to put multiple plots generated by ggplot2 in a page equivalent to par(mfrow= ).
    Example:
    http://code.google.com/p/gridextra/wiki/arrange
    came across through a conversation in StackOverflow
    http://stackoverflow.com/questions/1249548/side-by-side-plots-with-ggplot2-in-r

  • How to select the first/least/max row pe …

    How to select the first/least/max row per group in SQL

    A nice explanation about the subject. Easy to understand.
    http://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per-group-in-sql/

  • An nice example of using in Beamer clas …

    An nice example of using in the Beamer class in LaTex

    http://inspirated.com/2010/03/08/using-overlays-for-source-code-listings-in-latex-beamer

  • Quick fix of command line typo ^type^ …

    Quick fix of command line typo

    ^typo^correct
    

    This will replace the word ‘typo’ with ‘correct’ from the previous command line.
    http://lifehacker.com/5698494/quickly-fix-command-line-mistakes-with-the–symbol

  • Find duplicates in MySQL SELECT col1, …

    Find duplicates in MySQL

    SELECT col1, col2, count(col3)
    FROM t1
    GROUP BY col1, col2
    HAVING count(col3) > 1
    

    Adapted from
    http://support.microsoft.com/default.aspx?scid=kb;en-us;139444

  • Rewrapping in Vim gq or gw to stay…

    Rewrapping in Vim

    gq
    

    or

    gw
    

    to stay at the word where the cursor was.

    It will re-wrap the text depending on the textwidth or windowmargin value.

  • Another way of adjusting the spacing aft …

    Another way of adjusting the spacing after line with stretched table
    Use bookends package and \toprule, \midrule, and \bottomrule instead of \hline.

    In premeble

    \usepackage{booktabs}
    

    In context

    {table}[h]
    \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} ccr}
    \toprule
    Site pattern & supported $T_i$ & count \\
    \midrule
    xxx & $T_0$ & 4 \\ 
    xxy & $T_1$ & 3 \\ 
    \bottomrule
    \end{tabular*}
    \caption{Table1}
    \end{table}
    
  • Adjusting spacing after \hline in tabul …

    Adjusting spacing after \hline in tabular environment

    in preamble

    \newcommand\tstrut{\rule{0pt}{2.4ex}}
    \newcommand\bstrut{\rule[-1.0ex]{0pt}{0pt}}
    

    in content

    \begin{tabular}{ccc}
    \hline\hline 
    Head 1 & Head 2 & Head 3 \tstrut \bstrut \\
    \hline
    a1 & a2 & a3 \tstrut \\
    b1 & b2 & b3 \\
    c1 & c2 & c3 \\
    d1 & d2 & d3 \bstrut \\
    \hline\hline
    \end{tabular}
    

    https://www.msu.edu/~harris41/latex_tablespacing.html
    http://stackoverflow.com/questions/696157/latex-hline-spacing

  • To find out what method is attached to a …

    To find out what method is attached to an object in BioPerl during debugging, use ref commend.

    >x ref($seq)
    

    It’ll show the class where the object belongs to and search for the class.
    Not so funny… Any other way?
    NB. As it was said, the commend working during the debugging session; perl -d