search for: hast1

Displaying 7 results from an estimated 7 matches for "hast1".

Did you mean: hasta
2016 Apr 23
1
subset by multiple letters condition
Thanks Jean, Does anyone know how to set these [hast1] and [hast2] as the colors of a plot? On Friday, April 22, 2016 7: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 <-...
2016 Apr 22
0
subset by multiple letters condition
...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_t1" > Command[hasPD] [1] "_localize_PD" "_localize_PD_t1" > Command[hast1 & hasPD]...
2016 Apr 22
2
subset by multiple letters condition
Hi all, I have a data frame df and I want to do subset based on several conditions of letters of the names in Command.1)if the names contain PD 2)if the names contain t1 3)if the names contain t2 4)if the names contain t1 and PD 5)if the names contain t2 and PD 6)otherwise the names would be unknown. I don't know how to use grep for all these conditions. 'data.frame': 36919
2016 Apr 24
1
assign color to subsets
...ed on the names I have in Command. for example if the name has t1 or t2 > in it or if it has both of them.and then I need to plot in a way that > colors are names with t1,names with t2 and names with both. But now even > the grepl I use for the subsets does not work correct! :((( > > hast1=grepl("t1", df$Command, fixed=TRUE) > hast2=grepl("t2", df$Command, fixed=TRUE) > > > On Sunday, April 24, 2016 9:16 AM, jim holtman <jholtman at gmail.com> wrote: > > > > You never did provide a reproducible example or say how you wanted to > pl...
2016 Apr 23
4
assign color to subsets
...41,11,52,48,75,..... $TR :int 100,210,548,546,..... $Command :factor W/2229 levels "_localize_PD","_localize_tre_t2","_abdomen_t1_seq","knee_pd_t1_localize"... and the subsets are names in Command which has t1 or t2 letters: hast1=grepl("t1", df$Command, fixed=TRUE) hast2=grepl("t2", df$Command, fixed=TRUE) the colors I want in my plot are : hast1 and hast2 Thanks for any help. Elahe
2016 Apr 24
0
assign color to subsets
...o do subsets based on the names I have in Command. for example if the name has t1 or t2 in it or if it has both of them.and then I need to plot in a way that colors are names with t1,names with t2 and names with both. But now even the grepl I use for the subsets does not work correct! :((( > >hast1=grepl("t1", df$Command, fixed=TRUE) >hast2=grepl("t2", df$Command, fixed=TRUE) > > >On Sunday, April 24, 2016 9:16 AM, jim holtman <jholtman at gmail.com> wrote: > > > >You never did provide a reproducible example or say how you wanted to plot. Her...
2016 Apr 24
0
assign color to subsets
...I want to do subsets based on the names I have in Command. for example if the name has t1 or t2 in it or if it has both of them.and then I need to plot in a way that colors are names with t1,names with t2 and names with both. But now even the grepl I use for the subsets does not work correct! :((( hast1=grepl("t1", df$Command, fixed=TRUE) hast2=grepl("t2", df$Command, fixed=TRUE) On Sunday, April 24, 2016 9:16 AM, jim holtman <jholtman at gmail.com> wrote: You never did provide a reproducible example or say how you wanted to plot. Here is a way to get a subset of...