datatype 1 2 3 7integer   datatype 2 simplify 1 2 3 7floating   datatype 3 
simplify 1 2 3 7complex   (2&simplify=[:2&simplify 3&simplify) 1 2 3 71 1A 
correct result may be non-real! 
 



     Den 9:53 fredag den 26. juni 2015 skrev 'Bo Jacoby' via Programming 
<[email protected]>:
   
 

 Explanation: The vector 'A simplify B' has the same A moments as the vector 
B.Examples:   1 simplify 0 21   2 simplify 0 20 2   3 simplify 0 2_0.224745 1 
2.22474   2 simplify 3 simplify 0 20 2   1 simplify 3 simplify 0 21
 



    Den 0:04 fredag den 26. juni 2015 skrev Kip Murray <[email protected]>:
  
 

  1 X

 2 X X

 3

 4 X

 5

 6 X


 1 X

 2

 3 X

 4

 5 X

 6


 1
    X
 2 X

 3

 4

 5 X

 6


Above I have attempted three histograms.  The first shows the data set 1 2
2 4 6 which has mean 3 and standard deviation 2, median 2 and fourths (not
quartiles) 1.5 and 5 .  The second histogram shows the mean and the mean
plus or minus a standard deviation, and the third histogram shows the
median and fourths.  (The fourths are respectively the median of the
numbers below the median, and the median of the numbers above the median.)

--Kip Murray


On Thursday, June 25, 2015, Devon McCormick <[email protected]> wrote:

> I put together this J based on the "fivenum" routine in R mentioned in the
> Wikipedia link:
>
> fivenum=: 3 : 0
>    if. 0=#y=. /:~y do. 5#_.
>    else. n4=. -:<.-:3+#y
>        d=. <:1,n4,(-:>:#y),(n4-~>:#y),#y
>        -:(y{~<.d)+y{~>.d
>    end.
> )
>
> It returns the minimum, the quartile points, and the maximum of a series.
> The first branch of the "if" roughly replicates some of the R function's
> NA-handling.
>
> On Thu, Jun 25, 2015 at 10:14 AM, David Lambert <[email protected]
> <javascript:;>>
> wrote:
>
> > Is simplify supposed to report the i.x moments of the data?  Would be
> > useful.
> > When I removed the question marks from simplify to make valid j
> >    1 simplify DATA NB. does report the mean
> > Otherwise I haven't made sense of the results for the verb I created.
> >
> >    datatype N
> > integer
> >
> >    3 simplify N
> > _951.236j1533.8 _951.236j_1533.8 2658.39
> >
> >  Date: Thu, 25 Jun 2015 08:39:51 +0000 (UTC)
> >> From: "'Bo Jacoby' via Programming"<[email protected]
> <javascript:;>>
> >> To: Programming Forum<[email protected] <javascript:;>>
> >> Subject: [Jprogramming] simplify
> >> Message-ID:
> >>        <[email protected]
> <javascript:;>>
> >> Content-Type: text/plain; charset=UTF-8
> >>
> >> NB.?If you have got a bunch of numbers? ? ? ]n=.?20#10035 32 66 37 94 56
> >> 44 30 25 70 27 68 49 92 96 79 74 99 72 22NB. and you want to simplify,
> then
> >> take the mean value
> >>
> >
> >  <unreadable cut>
> >>
> >
> >  )NB.?If you can simplify the programming, the please let me know.
> >> ThanksBo
> >>
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
>
>
>
> --
> Devon McCormick, CFA
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


-- 
Sent from Gmail Mobile
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


 
  
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

 
  
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to