Displaying 2 results from an estimated 2 matches for "df_tq".
Did you mean:
df_t2
2016 Apr 24
1
assign color to subsets
'grepl' returns a logical vector; you have to use this to get your subset.
You can use:
df_tq <- subset(df, grepl("t1", Command))
df_t2 <- subset(df, grepl("t2", Command))
# if you want to also get a subset that has both, use
df_both <- subset(df, grepl("t1", Command) & grepl("t2", Command))
Jim Holtman
Data Munger Guru
What is the...
2016 Apr 24
0
assign color to subsets
...str(df_both)
$ Protocol : Factor w/ 0 levels:
Do you know what is the reason?
Thanks for replying
On Sunday, April 24, 2016 12:18 PM, jim holtman <jholtman at gmail.com> wrote:
'grepl' returns a logical vector; you have to use this to get your subset. You can use:
df_tq <- subset(df, grepl("t1", Command))
df_t2 <- subset(df, grepl("t2", Command))
# if you want to also get a subset that has both, use
df_both <- subset(df, grepl("t1", Command) & grepl("t2", Command))
Jim Holtman
Data Munger Guru
What is t...