As part of transitioning from using an old desktop to a new desktop (while both are still active), I found the 'rsync' command to be very useful. Here is the options I ended up using to accomplish my goal of copying over (old) files from the old machine to the new without wiping out any new files on the new machine:
rsync -avzuhP --log-file=/destination/dir/rsync_log.txt -e ssh remoteuser@remotehost:/source/dir /destination/dir/
Here's what the options do:
-a archive
-v verbose
-z compress
-u update <= Do Not Overwrite the Modified Files at the Destination
-h human-readable
-P progress bar/partial transfers
Note that these options are turned on in '-a' archive mode:
-r, --recursive recurse into directories
-l, --links copy symlinks as symlinks
-p, --perms preserve permissions
-t, --times preserve times
-g, --group preserve group
-o, --owner preserve owner (super-user only)
-D same as --devices --specials
Dr. Weeks is a Professor of Human Genetics and Biostatistics at the University of Pittsburgh. His research focuses on statistical human genetics in the area of mapping susceptibility loci involved in complex human diseases. The content on this blog is for informational purposes only - use at your own risk!
Monday, February 23, 2015
Thursday, August 28, 2014
Hiding 'answer' slides in student handouts using Beamer
After adding 'Question' slides, followed by 'Answer' slides, to my Beamer presentation, I wondered if there was an easy way to remove the 'Answer' slides from the handout version of the slides that I will give to the students.
It turns out that there is, as described in this link: just add <handout:0> right after the \begin{frame}
When 'handout' is added to the document class, all those slides marked with <handout:0> are automatically excluded.
This is wonderful!
It turns out that there is, as described in this link: just add <handout:0> right after the \begin{frame}
When 'handout' is added to the document class, all those slides marked with <handout:0> are automatically excluded.
This is wonderful!
Monday, June 16, 2014
The wonderful 'endfloat' LaTeX package
With LaTeX (or LyX), one can work on a manuscript while placing the tables and figures in their natural places, and then, with the addition of a single line to the preamble:
\usepackage[nolists,tablesfirst]{endfloat}
the tables and figures are magically moved to the end, as is required at submission by many journals.
The 'endfloat' package even inserts markers like "[Table 1 about here]" in the main text.
Now I just need to persuade my colleagues to start writing their manuscripts in LaTeX...
Thursday, April 10, 2014
Here is an amazing set of photographs of C.C. Li, who was the founder of the Division of Human Genetics within the Department of Biostatistics at the University of Pittsburgh.
Thursday, February 6, 2014
Markov Chain Humor
Possible mascots for a program that uses Markov Chains in its computations:
Markov Man
"Look, it's a bird... no, it's a plane,... no, I forgot what it was."
Hidden Markov Man
the truly Forgetful Man
Markov Man
"Look, it's a bird... no, it's a plane,... no, I forgot what it was."
Hidden Markov Man
the truly Forgetful Man
Tuesday, October 29, 2013
Computers are useful?!
"A computer makes it possible to do, in half an hour, tasks which were completely unnecessary to do before" ~ Dave Barry.
Wednesday, August 14, 2013
Zero p-values in R
For the top hits from an R program, I was getting all zero p-values, which are not that useful for ranking or plotting.
Turns out that the R program was calculating the p-value in this manner:
1 - pchisq(71.12830,1)
But, according to the discussion here, in R
".Machine$double.eps is the smallest number such that 1+x can be distinguished from 1"
On my machine, we have that:
> .Machine$double.eps
[1] 2.220446e-16
So that is why this truncates to zero:
> 1 - pchisq(71.12830,1)
[1] 0
However, we can get a non-zero p-value if instead we compute it this way:
> pchisq(71.12830,1,lower.tail=FALSE)
[1] 3.347341e-17
Turns out that the R program was calculating the p-value in this manner:
1 - pchisq(71.12830,1)
But, according to the discussion here, in R
".Machine$double.eps is the smallest number such that 1+x can be distinguished from 1"
On my machine, we have that:
> .Machine$double.eps
[1] 2.220446e-16
So that is why this truncates to zero:
> 1 - pchisq(71.12830,1)
[1] 0
However, we can get a non-zero p-value if instead we compute it this way:
> pchisq(71.12830,1,lower.tail=FALSE)
[1] 3.347341e-17
Subscribe to:
Posts (Atom)
