search for: max_of_count_b

Displaying 4 results from an estimated 4 matches for "max_of_count_b".

2016 Apr 20
2
Data reshaping with conditions
...ith the following code and I am struck with the intial step itself. The code is executed but higher and lower value of A is not coming. 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"))%&g...
2016 Apr 20
0
Data reshaping with conditions
...am struck with the intial step > itself. The code is executed but higher and lower value of A is not coming. > > 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 = ",")),...
2016 Apr 21
2
Data reshaping with conditions
...> itself. The code is executed but higher and lower value of A is not > coming. > > > > 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"], > > collaps...
2016 Apr 21
0
Data reshaping with conditions
...er and lower value of A is not >> > coming. >> > >> > 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"], >&...