Displaying 3 results from an estimated 3 matches for "t1_seq".
Did you mean:
ev_seq
2016 Apr 22
0
subset by multiple letters condition
You can use the grepl() function to give you logicals for each criterion,
then combine them as needed. For example:
# example version of Command
Command <- paste0("_localize_", c("PD","t2","t1_seq", "abc", "xyz",
"PD_t1"))
hasPD <- grepl("PD", Command, fixed=TRUE)
hast1 <- grepl("t1", Command, fixed=TRUE)
hast2 <- grepl("t2", Command, fixed=TRUE)
> Command[hast1]
[1] "_localize_t1_seq" "_localize_PD...
2016 Apr 22
2
subset by multiple letters condition
...s would be unknown. I don't know how to use grep for all these conditions.
'data.frame': 36919 obs. of 162 variables
$TE :int 38,41,11,52,48,75,.....
$Command :factor W/2229 levels "_localize_PD","_localize_tre_t2","_localize_t1_seq",...
Thanks for any help
2016 Apr 23
1
subset by multiple letters condition
...:39 AM, "Adams, Jean" <jvadams at usgs.gov> wrote:
You can use the grepl() function to give you logicals for each criterion, then combine them as needed. For example:
# example version of Command
Command <- paste0("_localize_", c("PD","t2","t1_seq", "abc", "xyz", "PD_t1"))
hasPD <- grepl("PD", Command, fixed=TRUE)
hast1 <- grepl("t1", Command, fixed=TRUE)
hast2 <- grepl("t2", Command, fixed=TRUE)
> Command[hast1]
[1] "_localize_t1_seq" "_localize_PD...