Thursday, July 25, 2013
Understanding R plot margins
Came across this great VISUAL explanation of the differences between margins (mar) and outer margin (oma) regions. This is very helpful.
How to subset RPy2 dataframe
This example demonstrates how to create subsets of RPy2 data frames using single or multiple criteria. I also wanted to test if using Github Gist is a better way the display code snippets on this blog than using Bloggers formatting tools.
And linked gist is here
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# By single criteria | |
subset_frame = dataframe.rx(dataframe.rx2('input_type').ro == 'VALUE', True) | |
# By Multiple Criteria | |
subset_frame = all_data_frame.rx((dataframe.rx2('input_type').ro == 'VALUE1').ro & | |
(dataframe.rx2('data_type').ro == 'VALUE2'), True) |
Subscribe to:
Posts (Atom)