Another option would be to convert the data into a long format and add
columns for each condition.
library(dplyr)
library(tidyr)
DF %>%
gather(key = "key", value = "value", -a, -d) %>%
mutate(
"d>=2" = ifelse(d >= 2, value, NA),
"d>=4" = ifelse(d >= 4, value, NA),
"d>=6" = ifelse(d
Thank you for including some sample data, but I have to ask that you
please invest some time in learning how to edit your code in a text editor
and to post in plain text. The quote marks in your example were "curly",
which R does not understand. There are other ways in which HTML email
leads to
These will be overlapping subgroups from the same data frame. For example,
d<=2 will have length=9, d<=4 will have length=7, etc.
Ken
kmna...@gmail.com
914-450-0816 (tel)
347-730-4813 (fax)
> On May 25, 2016, at 9:06 PM, William Dunlap wrote:
>
> Just to be clear, do you really want your '
Just to be clear, do you really want your 'condition' groups to be be
subsets
of one another? Most (all?) of the *ply functions assume you want
non-overlapping groups so they do a split-summarize-combine sequence.
You would have to replace the split part of that.
Bill Dunlap
TIBCO Software
wdunla
4 matches
Mail list logo