The close connection of the histogram to the stemplot adds to the stemplots
charm.
STEMPLOT=: 0 :
D=:/:~ 8*?16#16
SL=:'S L'=:|:0 10#:D NB. stem and leaf ists
DD=:(<./S)+i.>:(>./S)-<./S NB. data domain
SWL=:(":,.~.S),.'|'
Pascal writes:
> ...jqtide locale is comparatively sparse.
Yes, in J8 the ide is in the Qt binary, unlike J7 where the ide was in J.
> the "defs" tab working as J7
Fixed now, thanks.
>select multiple lines and then indent them with space or tab.
>the ability to either customize the script form
Damn'd. I couldn't write six lines correctly. The last line should be
21 Inställningar
because 'Instälningar' is Swedish, and 21<20 in ordinal fraction algebra.
Sorry. Bo.
Den 18:31 fredag den 16. maj 2014 skrev 'Bo Jacoby' via Programming
:
>
>
>I would represent you data using ordinal fr
I think this is related (ok maybe just marginally), but a difference I notice
between J8 and J7, is that J7 has a jgtkide locale, which appears to include
all of the ide functions, whereas jqtide locale is comparatively sparse.
Perhaps jpp has the formatting functions used?
Anyway a couple of
Here is a data array STEMPLOT which must include the data in the array.
STEMPLOT=: 0 :
D=:/:~ (>:?15)+?10#120
D=:/:~16 48 60 69 95 101 108 108 117 130
SL=:'S L'=:|:0 10#:D NB. stem and leaf ists
DD=:(<./S)+i.>:(>./S)-<./S NB. data domain
SW
I added a rosettacode entry, yesterday, which was inspired by Brian
Schott's turtle graphics work:
http://rosettacode.org/wiki/Fibonacci_word/fractal#J
Repeating the code here:
F_Words=: (,<@;@:{~&_1 _2)@]^:(2-~[)&('1';'0')
require 'plot'
plot }:+/\ 0,*/\(^~ 0j_1 0j1 $~ #)'0'=_1{::F_Words 20
Thi
Wait, I didn't deal properly with the second case because you had a
different kind of 2 there. And your original example in your first post had
still another different kind of 2. So I'd have to build a "2 normalizer" or
something before this could work properly. It's perfectly doable, but I'm
start
Here's an expression which handles both of the arguments you've given here,
and which roughly matches your original spec (though I've not added the
@(*@#) to make it work on empties):
((+:&.". ::+:)&.>@[`[@.] (~:&(0{cut'2')))/\~&2 cut '1 2 3 2 2 4 2 a
1'
┌─┬─┬─┬─┬─┬─┬─┬─┐
│2│2│6│4│2│8│2│a│
A follow up, its pretty easy to add other parameters to the function:
'(T2|.(
To: "programm...@jsoftware.com"
Cc:
Sent: Sunday, May 18, 2014 12:16:46 PM
Subject: Re: [Jprogramming] ^: and boxes
yes. sorry I didn't bother fixing the 2nd example:
one fix:
((1|.(<2)=]) +:@]^:[each]) scal
yes. sorry I didn't bother fixing the 2nd example:
one fix:
((1|.(<2)=]) +:@]^:[each]) scalarize@:tonumifnum each cut '1 2 3 2 2 4 2 a
1'
┌─┬─┬─┬─┬─┬─┬─┬─┬─┐
│2│2│6│4│2│8│2│a│1│
└─┴─┴─┴─┴─┴─┴─┴─┴─┘
where:
tonumifnum =: 0&".^:(1&". -: 0&".)
scalarize =: {.^: ((,1) -: $)
Here is anothe
Pascal
>The difficulty is your examples are contradictory. The number 2 is different
>from the letter 2.
>Perhaps a gold standard of the test case is needed eg
d2=: <2
or
d2=: <,2
or
d2=: <,'2'
or it might be a set...
greg
~krsnadas.org
--
from: 'Pascal Jasmin' via Programming
to
On Sun, May 18, 2014 at 9:56 AM, 'Pascal Jasmin' via Programming <
programm...@jsoftware.com> wrote:
>((1|.(<2)=]each) +:@]^:[each ]) (<'a') ,~ ;/ 1 2 3 2 2 4 2
>
Neat...
prices=:_3]\
'Joe';'Ohio';3.25;'Pascal';'Unk';'Unk';'Bob';'Ohio';3.125;'Jane';'Texas';3.75
] prices
┌──┬
That is a cool way of getting doubles:
([: >: (<2) = 1 |. ]) ;/ 1 2 3 2 2 4 2 1
2 1 2 2 1 2 1 1
I thank you for the creative approach, while still following all the
directions. I learned something from all of the creative approaches provided.
I was most interested in a good way to modify
I would probably do this. Boxing is based on original requirement of right
side being boxed
(> * [: >: (<2) = 1 |. ]) ;/ 1 2 3 2 2 4 2 1
2 2 6 4 2 8 2 1
Works on the negative test too
(> * [: >: (<2) = 1 |. ]) ;/ _1 2 _3 2 2 _4 2 _1
_2 2 _6 4 2 _8 2 _1
It doesn't use ^: , which was in the subj
Now there are no defined verbs.
D=:/:~115 77 77 114 108 116 77
D=:/:~ (>:?15)+?10#120
SL=:(S=:0{"2|:0 10#:D) ": /. L=:1{"2 |:0 10#:D NB. stem and leaf
DD=:(<./S)+i.>:(>./S)-<./S NB. data domain
SWL=:(":,.~.S),.'|'NB. stem with
15 matches
Mail list logo