Hello Jeff, This <https://gist.github.com/janherich/8255881#file-gistfile1-clj> should do the trick, at least it worked with data set you provided :)
Dňa sobota, 4. januára 2014 11:31:07 UTC+1 Jeff Angle napísal(-a): > > Hi...I get my nested vector from a database, then map a function that > formats it and computes the deviation, actual data looks like below......so > I don't have any keys within the the vector, ......would like to sort by > index 5 in in each vector descending and if index 5 is N/A (not e.g a > percentage)remove it from the list > [["151819" "ANTI HUMAN GLOBULIN SERUM 5ML " "6.0" 0 0 "N/A" "N/A"] > ["151090" "ANTI SERUM A 10ML " "6.0" 0 0 "N/A" "N/A"] ["151094" "ANTI SERUM > AB 10ML " "6.0" 0 0 "N/A" "N/A"] ["151092" "ANTI SERUM B 10ML " "6.0" 0 0 > "N/A" "N/A"] ["151095" "ANTI SERUM D 10ML " "6.0" 0 0 "N/A" "N/A"] > ["151825" "BLOOD GLUCOSE GLUCOMETER-CONTOUR " 0 0 0 "N/A" "N/A"] ["151829" > "BLOOD GLUCOSE STRIPS(50 STRIPS)-CONTOUR " "12.0" 360.0 0 "3000.00 %" > "N/A"] ["151828" "BLOOD GLUCOSE STRIPS(50 STRIPS)-SURESTEP" 0 360.0 0 "N/A" > "N/A"]] > Thanks again > > On Friday, January 3, 2014 9:33:42 PM UTC+3, john walker wrote: >> >> You can do something like this. >> >> https://gist.github.com/johnwalker/8243534 >> >> On Friday, January 3, 2014 12:37:07 PM UTC-5, Jeff Angle wrote: >>> >>> Hi guys! this has made me pull quite a load of hair new to clojure...... >>> >>> have a nested vector say [[salt 0 0 %deviation 0&0] [sugar 5 10 >>> %deviation 5$10] [milk 1 2 %deviation 1&2 ] [bread] .......] where % >>> deviation is the actual figure of evaluting the deviation between e.g 5 and >>> 10 for sugar, I want to sort using % deviation and also filter out those >>> with deviations of 0. Please help, will revenge when I master functional >>> programing with clojure >>> >> -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.