Monday, 15 March 2010

r - nomatch in data.table ':' not updating properly -


I am using data, Table 1.9.4 r 3.1.2 platform: x86_64-pc-linux-gnu ( 64-bit). ': =' Equation in function does not seem to work in logic. The following sample code is

  Library (Data Eligible) option (datatable.nomatch = 0) dt1 = data.table (a = c (Rep (1, 2), Representative (2, 2) (D1, A, B) DT1 DTW = Datatable (A = C (1,3), W1, B1, C1 (1: 2, 1: 2,1), C = 101: 105) = (201, 203), w2 = c (301,303), setkey (dtw, a) dtw dt 1 [dtw, ': =' (w1 = i.w1, w2 = i.w2)] dt1   ABC w1 w2 1: 1 1 201 201 301 2: 1 2 102 201 301 3:  

It returns nta in w1 and w2 columns in zero. 2 1 103 NA 4: 2 2 104 NA 5: 3 1 105 203 303

The correct output should be

  ABC w1 w2 1: 1 1 101 201 301 2: 1 2 102 201 301 3: 2 1 103 0 4: 2 2 104 0 0 5: 3 1 105 203 303  

What I am doing wrong and me How to get 0 on the spot?

As mentioned in the comments, your misunderstood current face-to-face The behavior is not filled with at least = 0 0 . Ensure that if commonman affects : = exactly it should be inside or external should indicate It is used to do without joining : = . Behavior is likely to change in 2.0.0 - Far future because it is 4 stable release from now. For reference - except for the current discussion on that change.


No comments:

Post a Comment