Displaying 4 results from an estimated 4 matches for "count_type_a_less".
Did you mean:
count_type_a_lesser
2016 Apr 20
2
Data reshaping with conditions
...g.
Expected_output= data %>%
group_by(id, Type) %>%
mutate(Count_of_B = paste(unlist(count[Type=="B"]), collapse = ","))%>%
mutate(Max_of_count_B = ifelse(Type == "B", max(count[Type ==
"B"]),max(count[Type == "A"]))) %>%
mutate(count_type_A_lesser = ifelse
(Type=="B",(paste(unlist(count[Type=="A"]) < Max_of_count_B[Type=="B"],
collapse = ",")), "NA"))%>%
mutate(count_type_A_higher =
ifelse(Type=="B",(paste(unlist(count[Type=="A"]) >
Max_of_count_B[Type=="...
2016 Apr 20
0
Data reshaping with conditions
...%>%
> group_by(id, Type) %>%
> mutate(Count_of_B = paste(unlist(count[Type=="B"]), collapse = ","))%>%
> mutate(Max_of_count_B = ifelse(Type == "B", max(count[Type ==
> "B"]),max(count[Type == "A"]))) %>%
> mutate(count_type_A_lesser = ifelse
> (Type=="B",(paste(unlist(count[Type=="A"]) < Max_of_count_B[Type=="B"],
> collapse = ",")), "NA"))%>%
> mutate(count_type_A_higher =
> ifelse(Type=="B",(paste(unlist(count[Type=="A"]) >
> Ma...
2016 Apr 21
2
Data reshaping with conditions
..._by(id, Type) %>%
> > mutate(Count_of_B = paste(unlist(count[Type=="B"]), collapse = ","))%>%
> > mutate(Max_of_count_B = ifelse(Type == "B", max(count[Type ==
> > "B"]),max(count[Type == "A"]))) %>%
> > mutate(count_type_A_lesser = ifelse
> > (Type=="B",(paste(unlist(count[Type=="A"]) < Max_of_count_B[Type=="B"],
> > collapse = ",")), "NA"))%>%
> > mutate(count_type_A_higher =
> > ifelse(Type=="B",(paste(unlist(count[Type=="A&...
2016 Apr 21
0
Data reshaping with conditions
...> mutate(Count_of_B = paste(unlist(count[Type=="B"]), collapse =
>> > ","))%>%
>> > mutate(Max_of_count_B = ifelse(Type == "B", max(count[Type ==
>> > "B"]),max(count[Type == "A"]))) %>%
>> > mutate(count_type_A_lesser = ifelse
>> > (Type=="B",(paste(unlist(count[Type=="A"]) < Max_of_count_B[Type=="B"],
>> > collapse = ",")), "NA"))%>%
>> > mutate(count_type_A_higher =
>> > ifelse(Type=="B",(paste(unlist(coun...