lines =. (CR,LF) cut data
data_lines =. }. lines
score_strings =. ({: @ (','&cut)@>)"1 data_lines
usable_data =. _1 }. score_strings
unboxed_scores =. > usable_data
That part seems to work. Read in the file, cut into individual lines, cut into cells and put the last cells into a noun, drop the empty box at the end, get rid of the boxes. Might have been easier if there were no boxes, but I'm sure there is a reason for them. At least it let me see the final, open box.
My last line, for now, is this:
numeric_scores =. ". unboxed_scores
which promptly throws an error:
|spelling error: scriptd (invalid character in sentence, code unit 13)
| 9
| ^
| numeric_scores=. ".unboxed_scores
|[-20] c:\users\jaco\documents\j_statistics_gemini_cli\gr9_stats.ijs
My LLM overlord is just as flummoxed as I am.
Any ideas? I don't know too much about programming, so go slowly. I know it could probably be done much more easily in python, but where is the f(rustration)un in that?
Thanks
".LF,'9'
|spelling error (invalid character in sentence, code unit 10)
|
9
| ^
| ".LF,'9'
You could try numeric_scores=. ".unboxed_scores-.CR,LF
To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@jsoftware.com.
|spelling error: scriptd (invalid character in sentence, code unit 13)
| 9
| ^
| numeric_scores=. ".unboxed_scores-.CR,LF
I then tried Henry's idea: numeric_scores =. ".@(-.&CRLF) @ > unboxed_scores (which I think means something like "unbox unboxed_scores, and then remove? CRLF, and then convert to numbers). This gave me an output with everything in triads: 900, 100, 800, etc.
I could calculate the mean and the median with my defined verbs and I got answers, albeit weird ones: mean numeric_scores
5.69231
0
0
However, variance doesn't work now, because of some shape issue: variance numeric_scores
|length error in variance, executing dyad -
|shapes 13 3 1 and 3 1 do not conform
| (+/(y-m)*(y -m))%#y
I think it might be time to read a book!
Henry, you asked that, if I did not need boxing, why did I use it in the first place. Is there another, better way of doing it?
Again, thank you both for the kind help.
Jaco