This entry is a quick tip about Bash shell. Many times I want to remove (rm), copy (cp), move (mv) or do other things (cat, head, etc.) to all files in a directory, except to a particular one or ones. If there are few files in a directory, it is not a big problem. But…
Tag: bash
Groups for cross validation
This post is for people that are interested in cross-validation or need, for any reason, to create random groups to perform some analysis. Some years ago, I had to do cross-validation and received from Ignacio Aguilar a simple and efficient tip using awk. To create random groups in a data set you can use the…
Loops. General view. For do loops.
Another suggestion of my colleague in the office. He asked me about loops in R. But I decided to do a more general post, because loops are structures that you will find in every programming language. So it is interesting to understand how they work and then apply the concept to a specific language. Loops…