R : Copyright 2001, The R Development Core Team
Version 1.3.0 (2001-06-22)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type `license()' or `licence()' for distribution details.
R is a collaborative project with many contributors.
Type `contributors()' for more information.
Type `demo()' for some demos, `help()' for on-line help, or
`help.start()' for a HTML browser interface to help.
Type `q()' to quit R.
> #a<-sequence(7)/10
> #a<-sequence(1000000)/1000000
> #a<-sequence(100000)/100000
> #a<-sequence(10000)/10000
> #a<-sequence(1000)/1000
> #a<-sequence(100)/100
> a<-sequence(10)/10
> b<-a*10
>
> dnorm(a,mean=0,sd=1,log=0)
[1] 0.3969525 0.3910427 0.3813878 0.3682701 0.3520653 0.3332246 0.3122539
[8] 0.2896916 0.2660852 0.2419707
> pnorm(a,mean=0,sd=1,lower.tail=0,log.p=0)
[1] 0.4601722 0.4207403 0.3820886 0.3445783 0.3085375 0.2742531 0.2419637
[8] 0.2118554 0.1840601 0.1586553
> qnorm(a,mean=0,sd=1,lower.tail=0,log.p=0)
[1] 1.2815516 0.8416212 0.5244005 0.2533471 0.0000000 -0.2533471
[7] -0.5244005 -0.8416212 -1.2815516 -Inf
> rnorm(a,mean=0,sd=1)
[1] 0.24601129 0.05403326 0.40805302 -0.50471608 -1.48413289 1.60063569
[7] 0.89451743 0.04391959 -0.59718877 -0.24192133
>
> dunif(a,min=0,max=1,log=0)
[1] 1 1 1 1 1 1 1 1 1 1
> punif(a,min=0,max=1,lower.tail=0,log.p=0)
[1] 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0
> qunif(a,min=0,max=1,lower.tail=0,log.p=0)
[1] 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0
> runif(a,min=0,max=1)
[1] 0.34312770 0.43296455 0.02861484 0.93581571 0.83829274 0.17305348
[7] 0.95563143 0.68850495 0.39320414 0.73728890
>
> dgamma(a,shape=0.5,scale=1,log=0)
[1] 1.6143423 1.0328831 0.7630906 0.5979671 0.4839414 0.3997355 0.3348651
[8] 0.2834291 0.2417902 0.2075537
> pgamma(a,shape=0.5,scale=1,lower.tail=0,log.p=0)
[1] 0.6547208 0.5270893 0.4385780 0.3710934 0.3173105 0.2733217 0.2367236
[8] 0.2059032 0.1797125 0.1572992
> qgamma(a,shape=0.5,scale=1,lower.tail=0,log.p=0)
[1] 1.352771727 0.821187208 0.537097085 0.354163150 0.227468212 0.137497949
[7] 0.074235931 0.032092377 0.007895387 0.000000000
> rgamma(a,shape=0.5,scale=1)
[1] 0.36544119 0.23486895 0.01716504 0.02470043 0.14747984 0.78427132
[7] 0.45813375 0.23106320 1.66483725 0.05870055
>
> dbeta(a,shape1=0.5,shape2=1,log=0)
[1] 1.5811388 1.1180340 0.9128709 0.7905694 0.7071068 0.6454972 0.5976143
[8] 0.5590170 0.5270463 0.5000000
> pbeta(a,shape1=0.5,shape2=1,lower.tail=0,log.p=0)
[1] 0.6837722 0.5527864 0.4522774 0.3675445 0.2928932 0.2254033 0.1633400
[8] 0.1055728 0.0513167 0.0000000
> qbeta(a,shape1=0.5,shape2=1,lower.tail=0,log.p=0)
[1] 0.81 0.64 0.49 0.36 0.25 0.16 0.09 0.04 0.01 0.00
> rbeta(a,shape1=0.5,shape2=1)
[1] 0.498593387 0.310556573 0.406136592 0.802377758 0.150878556 0.022167739
[7] 0.002453991 0.176981147 0.571112702 0.368524205
>
> dlnorm(a,meanlog=0,sdlog=1,log=0)
[1] 0.2815902 0.5462679 0.6442033 0.6554442 0.6274961 0.5835738 0.5347948
[8] 0.4864158 0.4408157 0.3989423
> plnorm(a,meanlog=0,sdlog=1,lower.tail=1,log.p=0)
[1] 0.01065110 0.05376031 0.11430005 0.17975721 0.24410860 0.30473658
[7] 0.36066758 0.41171189 0.45804487 0.50000000
> qlnorm(a,meanlog=0,sdlog=1,lower.tail=1,log.p=0)
[1] 0.2776062 0.4310112 0.5919101 0.7761984 1.0000000 1.2883304 1.6894457
[8] 2.3201254 3.6022245 Inf
> rlnorm(a,meanlog=0,sdlog=1)
[1] 2.79637238 7.08313416 2.26952619 0.42586205 0.71401660 0.08789942
[7] 13.39486599 0.21655694 3.53668951 6.66539521
>
> dchisq(a,df=2,log=0)
[1] 0.4756147 0.4524187 0.4303540 0.4093654 0.3894004 0.3704091 0.3523440
[8] 0.3351600 0.3188141 0.3032653
> pchisq(a,df=2,lower.tail=1,log.p=0)
[1] 0.04877058 0.09516258 0.13929202 0.18126925 0.22119922 0.25918178
[7] 0.29531191 0.32967995 0.36237185 0.39346934
> qchisq(a,df=2,lower.tail=1,log.p=0)
[1] 0.2107210 0.4462871 0.7133499 1.0216512 1.3862944 1.8325815 2.4079456
[8] 3.2188758 4.6051702 Inf
> rchisq(a,df=2)
[1] 3.6815429 5.3516761 1.7638568 5.4763670 8.7291515 2.1503727 0.1552034
[8] 0.8211852 0.1147259 8.7405538
>
> dchisq(a,df=2,ncp=1.2,log=0)
[1] 0.2689125 0.2634152 0.2579229 0.2524439 0.2469859 0.2415560 0.2361606
[8] 0.2308057 0.2254966 0.2202382
> pchisq(a,df=2,ncp=1.2,lower.tail=1,log.p=0)
[1] 0.02716599 0.05378237 0.07984919 0.10536738 0.13033867 0.15476550
[7] 0.17865102 0.20199898 0.22481369 0.24709998
> #BROKEN??? qchisq(a,df=2,ncp=1.2,lower.tail=1,log.p=0)
>
> df(a,df1=2,df2=1,log=0)
[1] 0.7607258 0.6036816 0.4941059 0.4140867 0.3535534 0.3064545 0.2689572
[8] 0.2385283 0.2134337 0.1924501
> pf(a,df1=2,df2=1,lower.tail=1,log.p=0)
[1] 0.08712907 0.15484575 0.20943058 0.25464401 0.29289322 0.32580014
[7] 0.35450278 0.37982633 0.40238570 0.42264973
> qf(a,df1=2,df2=1,lower.tail=1,log.p=0)
[1] 0.1172840 0.2812500 0.5204082 0.8888889 1.5000000 2.6250000
[7] 5.0555556 12.0000000 49.5000000 Inf
> rf(a,df1=2,df2=1)
[1] 0.08282453 1.01625067 0.26747505 54.48542121 2.29666170 0.77496636
[7] 68.66608680 5.58782759 0.16672506 0.30044518
>
> dt(a,df=2,log=0)
[1] 0.3509182 0.3432059 0.3309639 0.3150064 0.2962963 0.2758240 0.2545077
[8] 0.2331278 0.2122954 0.1924501
> pt(a,df=2,lower.tail=1,log.p=0)
[1] 0.5352673 0.5700140 0.6037572 0.6360828 0.6666667 0.6952834 0.7218035
[8] 0.7461830 0.7684475 0.7886751
> qt(a,df=2,lower.tail=1,log.p=0)
[1] -1.8856181 -1.0606602 -0.6172134 -0.2886751 0.0000000 0.2886751
[7] 0.6172134 1.0606602 1.8856181 Inf
> rt(a,df=2)
[1] 2.01649810 -1.72815459 0.08410408 -4.99499495 1.00849946 0.63621246
[7] 6.19773000 -3.77622619 0.05081672 -0.49961665
>
> dbinom(b,size=20,prob=.1,log=0)
[1] 2.701703e-01 2.851798e-01 1.901199e-01 8.977883e-02 3.192136e-02
[6] 8.867045e-03 1.970454e-03 3.557765e-04 5.270763e-05 6.442043e-06
> pbinom(b,size=20,prob=.1,lower.tail=1,log.p=0)
[1] 0.3917470 0.6769268 0.8670467 0.9568255 0.9887469 0.9976139 0.9995844
[8] 0.9999401 0.9999928 0.9999993
> qbinom(a,size=200,prob=.1,lower.tail=1,log.p=0)
[1] 15 16 18 19 20 21 22 24 26 200
> rbinom(b,size=20,prob=.1)
[1] 2 0 0 2 3 3 3 0 1 0
>
> dcauchy(a,location=0.5,scale=1,log=0)
[1] 0.2744051 0.2920274 0.3060672 0.3151583 0.3183099 0.3151583 0.3060672
[8] 0.2920274 0.2744051 0.2546479
> pcauchy(a,location=0.5,scale=1,lower.tail=1,log.p=0)
[1] 0.3788811 0.4072264 0.4371670 0.4682745 0.5000000 0.5317255 0.5628330
[8] 0.5927736 0.6211189 0.6475836
> qcauchy(a,location=0.5,scale=1,lower.tail=1,log.p=0)
[1] -2.577684e+00 -8.763819e-01 -2.265425e-01 1.750803e-01 5.000000e-01
[6] 8.249197e-01 1.226543e+00 1.876382e+00 3.577684e+00 1.633178e+16
> dcauchy(a,location=0.5,scale=1)
[1] 0.2744051 0.2920274 0.3060672 0.3151583 0.3183099 0.3151583 0.3060672
[8] 0.2920274 0.2744051 0.2546479
>
> dexp(a,rate=2,log=0)
[1] 1.6374615 1.3406401 1.0976233 0.8986579 0.7357589 0.6023884 0.4931939
[8] 0.4037930 0.3305978 0.2706706
> pexp(a,rate=2,lower.tail=1,log.p=0)
[1] 0.1812692 0.3296800 0.4511884 0.5506710 0.6321206 0.6988058 0.7534030
[8] 0.7981035 0.8347011 0.8646647
> qexp(a,rate=2,lower.tail=1,log.p=0)
[1] 0.05268026 0.11157178 0.17833747 0.25541281 0.34657359 0.45814537
[7] 0.60198640 0.80471896 1.15129255 Inf
> rexp(a,rate=2)
[1] 0.49955227 0.99723081 0.23102401 1.11936596 0.20791911 1.02566125
[7] 0.94868964 0.07410485 0.10435751 0.21014547
>
> dgeom(b,prob=.1,log=0)
[1] 0.09000000 0.08100000 0.07290000 0.06561000 0.05904900 0.05314410
[7] 0.04782969 0.04304672 0.03874205 0.03486784
> pgeom(b,prob=.1,lower.tail=1,log.p=0)
[1] 0.1900000 0.2710000 0.3439000 0.4095100 0.4685590 0.5217031 0.5695328
[8] 0.6125795 0.6513216 0.6861894
> qgeom(a,prob=.1,lower.tail=1,log.p=0)
[1] 0 2 3 4 6 8 11 15 21 Inf
> dgeom(b,prob=.1)
[1] 0.09000000 0.08100000 0.07290000 0.06561000 0.05904900 0.05314410
[7] 0.04782969 0.04304672 0.03874205 0.03486784
>
> dhyper(b,m=3,n=7,k=10,log=0)
[1] 0 0 1 0 0 0 0 0 0 0
> phyper(b,m=3,n=7,k=10,lower.tail=1,log.p=0)
[1] 0 0 1 1 1 1 1 1 1 1
> qhyper(a,m=3,n=7,k=10,lower.tail=1,log.p=0)
[1] 3 3 3 3 3 3 3 3 3 3
> rhyper(b,m=3,n=7,k=10)
[1] 3 3 3 3 3 3 3 3 3 3
>
> dnbinom(b,size=20,prob=.1,log=0)
[1] 1.800000e-19 1.701000e-18 1.122660e-17 5.809765e-17 2.509819e-16
[6] 9.411820e-16 3.146237e-15 9.556695e-15 2.675875e-14 6.984033e-14
> pnbinom(b,size=20,prob=.1,lower.tail=1,log.p=0)
[1] 1.900000e-19 1.891000e-18 1.311760e-17 7.121526e-17 3.221971e-16
[6] 1.263379e-15 4.409616e-15 1.396631e-14 4.072506e-14 1.105654e-13
> qnbinom(a,size=200,prob=.1,lower.tail=1,log.p=0)
[1] 1630 1686 1727 1763 1797 1831 1868 1912 1974 Inf
> rnbinom(b,size=20,prob=.10)
[1] 175 162 258 149 152 140 132 244 148 116
>
> dpois(b,lambda=1,log=0)
[1] 3.678794e-01 1.839397e-01 6.131324e-02 1.532831e-02 3.065662e-03
[6] 5.109437e-04 7.299195e-05 9.123994e-06 1.013777e-06 1.013777e-07
> ppois(a,lambda=1,lower.tail=1,log.p=0)
[1] 0.3678794 0.3678794 0.3678794 0.3678794 0.3678794 0.3678794 0.3678794
[8] 0.3678794 0.3678794 0.7357589
> qpois(a,lambda=1,lower.tail=1,log.p=0)
[1] 0 0 0 1 1 1 1 2 2 Inf
> rpois(b,lambda=1)
[1] 0 0 1 1 0 1 0 2 2 1
>
> dweibull(a,shape=0.5,scale=1,log=0)
[1] 1.1524817 0.7148791 0.5278816 0.4200182 0.3486522 0.2975030 0.2588595
[8] 0.2285495 0.2040990 0.1839397
> pweibull(a,shape=0.5,scale=1,lower.tail=0,log.p=0)
[1] 0.7288934 0.6394073 0.5782653 0.5312856 0.4930687 0.4608896 0.4331548
[8] 0.4088417 0.3872506 0.3678794
> qweibull(a,shape=0.5,scale=1,lower.tail=0,log.p=0)
[1] 5.30189811 2.59029039 1.44955051 0.83958871 0.48045301 0.26094282
[7] 0.12721702 0.04979304 0.01110084 Inf
> rweibull(a,shape=0.5,scale=1)
[1] 1.816404668 1.571231571 7.703301765 0.002184037 0.151762919
[6] 11.476294960 1.415391168 0.009165131 0.288818329 0.749674484
>
> dlogis(a,location=0.5,scale=1,log=0)
[1] 0.2402607 0.2444583 0.2475166 0.2493760 0.2500000 0.2493760 0.2475166
[8] 0.2444583 0.2402607 0.2350037
> plogis(a,location=0.5,scale=1,lower.tail=1,log.p=0)
[1] 0.4013123 0.4255575 0.4501660 0.4750208 0.5000000 0.5249792 0.5498340
[8] 0.5744425 0.5986877 0.6224593
> qlogis(a,location=0.5,scale=1,lower.tail=1,log.p=0)
[1] -1.6972246 -0.8862944 -0.3472979 0.0945349 0.5000000 0.9054651
[7] 1.3472979 1.8862944 2.6972246 Inf
> rlogis(a,location=0.5,scale=1)
[1] 1.0171792 0.8236794 -0.1698995 3.1500455 0.2955128 0.4589077
[7] 0.6944258 1.8903677 -0.2792350 0.8947818
>
> dbeta(a,shape1=0.5,shape2=1,ncp=1.2,log=0)
[1] 1.0319746 0.8578579 0.8157266 0.8163111 0.8381401 0.8733577 0.9184717
[8] 0.9717750 1.0324153 1.1000000
> pbeta(a,shape1=0.5,shape2=1,ncp=1.2,lower.tail=0,log.p=0)
[1] 0.8157188 0.7232717 0.6401206 0.5587507 0.4761624 0.3906807 0.3011628
[8] 0.2067142 0.1065637 0.0000000
>
> pf(a,df1=2,df2=1,ncp=1.2,lower.tail=1,log.p=0)
[1] 0.05161565 0.09706936 0.13715195 0.17268052 0.20437133 0.23282096
[7] 0.25851811 0.28186196 0.30317954 0.32274025
>
> pt(a,df=2,ncp=1.2,lower.tail=1,log.p=0)
[1] 0.1334598 0.1542460 0.1774086 0.2028249 0.2302693 0.2594257 0.2899099
[8] 0.3212987 0.3531597 0.3850788
>
> ptukey(a,nmeans=5,df=2,nranges=1,lower.tail=1,log.p=0)
[1] 1.124918e-05 1.762814e-04 8.624548e-04 2.601185e-03 5.989831e-03
[6] 1.159155e-02 1.985375e-02 3.105736e-02 4.529919e-02 6.250234e-02
> qtukey(a,nmeans=50,df=2,nranges=1,lower.tail=1,log.p=0)
[1] 2.856335 3.464067 4.038361 4.656729 5.379121 6.290112 7.552342
[8] 9.575397 13.977576 NaN
Warning message:
NaNs produced in: qtukey(p, nranges, nmeans, df, lower.tail, log.p)
>
> dwilcox(b,m=3,n=7,log=0)
[1] 0.008333333 0.016666667 0.025000000 0.033333333 0.041666667 0.058333333
[7] 0.066666667 0.075000000 0.083333333 0.083333333
> pwilcox(b,m=3,n=7,lower.tail=1,log.p=0)
[1] 0.01666667 0.03333333 0.05833333 0.09166667 0.13333333 0.19166667
[7] 0.25833333 0.33333333 0.41666667 0.50000000
> qwilcox(a,m=3,n=7,lower.tail=1,log.p=0)
[1] 5 7 8 9 10 12 13 14 16 21
> rwilcox(b,m=3,n=7)
[1] 21 21 10 10 11 11 7 8 12 5
>
> dsignrank(b,n=7,log=0)
[1] 0.0078125 0.0078125 0.0156250 0.0156250 0.0234375 0.0312500 0.0390625
[8] 0.0390625 0.0468750 0.0546875
> psignrank(b,n=7,lower.tail=1,log.p=0)
[1] 0.0156250 0.0234375 0.0390625 0.0546875 0.0781250 0.1093750 0.1484375
[8] 0.1875000 0.2343750 0.2890625
> qsignrank(a,n=7,lower.tail=1,log.p=0)
[1] 6 9 11 12 14 16 17 19 22 28
> rsignrank(b,n=7)
[1] 10 18 7 27 15 16 6 7 17 19
>
> beta(4,3)
[1] 0.01666667
> lbeta(4,3)
[1] -4.094345
> gamma(a)
[1] 9.513508 4.590844 2.991569 2.218160 1.772454 1.489192 1.298055 1.164230
[9] 1.068629 1.000000
> lgamma(a)
[1] 2.25271265 1.52406382 1.09579799 0.79667782 0.57236494 0.39823386
[7] 0.26086725 0.15205968 0.06637624 0.00000000
> digamma(a)
[1] -10.4237549 -5.2890399 -3.5025242 -2.5613845 -1.9635100 -1.5406192
[7] -1.2200236 -0.9650086 -0.7549269 -0.5772157
> trigamma(a)
[1] 101.433299 26.267377 12.245365 7.275357 4.934802 3.636210
[7] 2.834049 2.299474 1.922540 1.644934
> tetragamma(a)
[1] -2001.861457 -251.478036 -75.272537 -32.239129 -16.828797
[6] -9.962832 -6.434993 -4.430116 -3.201797 -2.404114
> pentagamma(a)
[1] 60004.512877 3753.244995 743.141765 236.195259 97.409091
[6] 47.407041 25.879150 15.370892 9.739014 6.493939
>
> choose(5,2)
[1] 10
> lchoose(5,2)
[1] 2.302585
>
> besselI(a,2,expon.scaled=0)
[1] 0.001251042 0.005016688 0.011334613 0.020268004 0.031906149 0.046365279
[7] 0.063789653 0.084352916 0.108259725 0.135747670
> besselK(a,2,expon.scaled=0)
[1] 199.503965 49.512429 21.745740 12.036301 7.550184 5.120305
[7] 3.661330 2.719801 2.079027 1.624839
> besselJ(a,2)
[1] 0.001248959 0.004983354 0.011165862 0.019734663 0.030604023 0.043665097
[7] 0.058786944 0.075817762 0.094586304 0.114903485
> besselY(a,2)
[1] -127.644783 -32.157145 -14.480094 -8.298336 -5.441371 -3.892795
[7] -2.961478 -2.358558 -1.945910 -1.650683
>