search for: srivibish

Displaying 5 results from an estimated 5 matches for "srivibish".

2016 Apr 20
0
Data reshaping with conditions
...t;B",0))]]) svdatstr[row,"x"]<-svdatstr[row,"maxA"] < svdatstr[row,"maxB"] svdatstr[row,"y"]<-!svdatstr[row,"x"] } svdatstr You can then just extract the columns that you need. Jim On Wed, Apr 20, 2016 at 3:03 PM, sri vathsan <srivibish at gmail.com> wrote: > Dear All, > > I am trying to reshape the data with some conditions. A small part of the > data looks like below. Like this there will be more data with repeating ID. > > Count id name type > 117 335 sally A > 19 335 sally A > 167 335 sally B >...
2016 Apr 21
2
Data reshaping with conditions
...lt;-svdatstr[row,"maxA"] < svdatstr[row,"maxB"] > svdatstr[row,"y"]<-!svdatstr[row,"x"] > } > svdatstr > > You can then just extract the columns that you need. > > Jim > > > On Wed, Apr 20, 2016 at 3:03 PM, sri vathsan <srivibish at gmail.com> wrote: > > Dear All, > > > > I am trying to reshape the data with some conditions. A small part of the > > data looks like below. Like this there will be more data with repeating > ID. > > > > Count id name type > > 117 335 sally A >...
2016 Apr 21
0
Data reshaping with conditions
...-svdatstr[row,indicesA][svdatstr[row,indicesA]>=svdatstr[row,"maxB"]] svdatstr[row,"y"]<-paste(AgeB,collapse=",") } svdatstr[,c("id","name","maxB","x","y")] Jim On Thu, Apr 21, 2016 at 2:23 PM, sri vathsan <srivibish at gmail.com> wrote: > Hi Jim, > > Thanks for your time. But somehow this code did not help me to achieve my > expected output. > Problems: 1) x, y are coming as logical rather than values as I mentioned in > my post > 2) The values that I get for Max A and Ma...
2016 Apr 20
2
Data reshaping with conditions
Dear All, I am trying to reshape the data with some conditions. A small part of the data looks like below. Like this there will be more data with repeating ID. Count id name type 117 335 sally A 19 335 sally A 167 335 sally B 18 340 susan A 56 340 susan A 22 340 susan B 53 340 susan B 135 351 lee A 114 351 lee A 84 351 lee A 80 351 lee A 19 351 lee A 8 351 lee A 21 351 lee A 88 351 lee B 111 351
2016 Apr 21
0
Data reshaping with conditions
...es, producing a vector of all of the "Count" values that are less than the value of "maxB". The line following this in the code uses the same logic to extract those values that are greater than or equal to "maxB". Jim On Thu, Apr 21, 2016 at 11:25 PM, sri vathsan <srivibish at gmail.com> wrote: > Dear Jim, > > I hope, I am not pestering you. When I was studying your code to grasp and > learn and found one thing which I can not understand the following line. I > would be grateful If you could tell what it exactly denote and this helps me > to grow...