Last active
March 21, 2016 16:54
-
-
Save sahilseth/c78c0713c6fd830a52fa to your computer and use it in GitHub Desktop.
subset a tsv file using R. In this example, get a list of errored commands in flowr.
This file contains hidden or 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
# idea is to, first filter based on a condition, and then display the results | |
Rscript -e 'library(dplyr);params::read_sheet("flow_details.txt") %>% filter(exit_code>0)' | less | |
# we add select, to show only a few columns: | |
Rscript -e 'library(dplyr);params::read_sheet("flow_details.txt") %>% filter(exit_code>0) %>% select(jobname, jobnm, num, exit_code, cmd)' | less | |
# add kable, to show results in a markdown format: | |
Rscript -e 'library(dplyr);library(params);read_sheet("flow_details.txt") %>% filter(exit_code>0) %>% select(jobname, jobnm, num, exit_code, cmd)%>% kable()' | less | |
# get jobs which are still runnning | |
Rscript -e 'library(dplyr);params::read_sheet("flow_details.txt") %>% filter(is.na(exit_code))' | less | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment