Skip to content

Commit

Permalink
Update print_or_remove_lines_by_pattern.R
Browse files Browse the repository at this point in the history
  • Loading branch information
olgatsiouri1996 authored Nov 3, 2020
1 parent 20877f1 commit 9ba1fb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion text_manipulation/print_or_remove_lines_by_pattern.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
library(glue)
library(stringr)
args = commandArgs(trailingOnly=TRUE)
glue("usage: print_or_remove_lines_by_pattern.R input_txt column_name pattern boolean_print_or_remove output_txt")
glue("usage: print_or_remove_lines_by_pattern.R input_txt header_boolean column_name pattern boolean_print_or_remove output_txt")
# main
input_txt <- read.delim(args[1], header= as.logical(args[2]))
filtered_txt <- input_txt[str_detect(input_txt[ ,as.numeric(args[3])], args[4], negate = as.logical(args[5])), ]
Expand Down

0 comments on commit 9ba1fb0

Please sign in to comment.