Forum Replies Created

  • Cecilia

    Member
    August 2, 2024 at 2:06 pm in reply to: How can I apply a func to a grouped table?

    Thank you so much! I reeeally appreciate your help!! 🤩🤩

  • Cecilia

    Member
    August 1, 2024 at 1:44 pm in reply to: How can I apply a func to a grouped table?

    Thanks soo much! Only a small and last question. Is there anything special about the table?

    I used

    rev:{stock xcols update stock:key x from (value x)[AskOrder],'(value x)[BidOrder]} r; <br>ddd: string dt[i][date2]; 
    save hsym $":/Users/void_dump/Desktop/Reverse/", ddd,"/rev.csv"</pre><p>ddd is a string of date, e.g. '2014.01.01'</p><p>I've done this several times before and they all work well. But this time it says</p><pre>'type<br> [0] save hsym$":/Users/void_dump/Desktop/Reverse/", ddd,"/rev.csv"
    ^

    I searched but didn’t see a solution. This rev table isn’t a keyed one, nor is it very special, I don’t see why there would be a bug here…

  • Cecilia

    Member
    July 27, 2024 at 3:50 am in reply to: How can I apply a func to a grouped table?

    I ran into another problem. It seems some AskOrder of the stock has less than 16 data, so it says

    ‘length

    [1] f:{(`$x,/:string 1+til y)!az -1+(where deltas y xrank az:asc z),count z}

    What should I do?

    I’ve tried to filter out those stock using:

    select from t where count each AskOrder > 16 by stock

    However, it says

     'stock
    [3] select from t where count each AskOrder > 16 by stock

    My t is like this:

    q)t
    stock AskOrder BidOrder
    -----------------------
    p 1 39
    e 76 97
    k 65 74

    I’ve also tried to use length:

    l: select length: count each AskOrder by stock from t;
    l: () xkey lengths;
    select stock from l where length > 16;

    But it says:

    'type
    [3] select stock from l where length > 16;
  • Cecilia

    Member
    July 24, 2024 at 2:42 am in reply to: How can I apply a func to a grouped table?

    Thank you so very much!!