rggobi/0000755000176000001440000000000011777507413011567 5ustar ripleyusersrggobi/MD50000644000176000001440000002226011777507413012101 0ustar ripleyusers94e9cdda510007aff84add1b2c8640ae *CHANGELOG 175d17fe2fc47112349ee930a49a996e *DESCRIPTION 030296c3af32aec12c204afd4b697641 *NAMESPACE d468e54d665b49c710c2aefdf1acd116 *NEWS 31e2cd98eeda7f4291283eb65f333fb8 *R/call.r e616badb7b504b05dd5e8cf8c396c3c4 *R/colorSchemes.r 67b755ab164360cf915047e55d9375a0 *R/data.r 656342f0ffb1e8f5b137b872b82b766c *R/datasets.r 54a55fa4df9bcf05ab59347ea5e22edc *R/display-modes.r b2d14be8e20cc958846632897daab0fb *R/display-tour.r da5bc63f57888b7ee165050ebef809cc *R/display-variables.r b5d8b1964cd6c60f4fbc7bc66bed8a62 *R/display.r 23d8c245a2a0639d980eb402e4cd6b5a *R/edges.r 016431cbe4912215fe3d98a44714ce0b *R/ggobi.r 5a72bf383dc70b19f9d08ade74c46dbd *R/glyphs.r 0385a8d7a3ced79fb573291ec9acdff9 *R/gtk.r a7d60afa469592ad281d0fe70a3d1539 *R/longitudinal.r 05d4303c1e82e94d4de96ab0142f006c *R/next-version/PlotDescriptions.S db00eef69d6b55608dbd2d436c59f8c7 *R/next-version/brush.S bf0d3f8abdb413ea76c7594585a9d6f9 *R/next-version/brush.r 92238deb14173cf9a4b8264a43e2ee7b *R/next-version/colour-schemes.r 3a087acc9e15c1872678510759308ded *R/next-version/options.r 5e6ed9f747fcb2df15fbe9b61c22c724 *R/next-version/plotLayout.S 55aa97a67b2f52adba9176cf621b652a *R/plot.r d41d8cd98f00b204e9800998ecf8427e *R/utils.r b0a8f59284aeff8afeac458729550489 *R/zzz.r 724a38b18d3a915681f4d96863820415 *aclocal.m4 3ac8f04a8c6cfc52a56052ced9994e2d *configure ec766b97d4cb67e2146f43bae2753889 *configure.in d41d8cd98f00b204e9800998ecf8427e *configure.win 13c5d3a10d1098be7adc3897c916fdd1 *data/stormtracks.rda 616c70adb477616996a3116681a9a2bf *demo/00Index 2aca275a8e1ca4336d04ea581ac35bf6 *demo/ball.R 88f604b7d351fd1b5946e94672eb6f1d *load.r f0a81eddc630110e9152f0d3605ac5d0 *man/GGobiCall-n1.rd f9f97db03d7b18915a2134f96363ed25 *man/GGobiData-class.rd 9370882dea7d1eabb79ba39b3502fdf3 *man/as-RGtkObject-8g.rd 68823d1d7ebc90338ea57ea164410aed *man/as-data-frame-GGobiData-i6.rd 91b1f36da32f5504424833bd6ffaf4d2 *man/check-versions-xs.rd 9d4a0819842c0bd1fdc366898c2c1e28 *man/clean-ggobi-bw.rd 2787fae50b200f4a1ba3711c07df6f57 *man/close-GGobi-kz.rd e16a5a57a146f0419ed92b7315e0a73e *man/close-GGobiDisplay-ke.rd d1750ad1805815886210c0ab856a29fb *man/colorscheme--b2.rd 8f22055351b3a6181639d5a2234d7e63 *man/colorscheme-6n.rd ce604c219e4371795e233e9f46eb3e78 *man/connecting-edges-vf.rd fc0111e25d3b2558b3a1d6432721342b *man/dataset-GGobiDisplay-gk.rd 6bb45537ac82d4518ceedd4e40c32352 *man/dataset-mn.rd 54f7e0a86e5d07a1e1e4f8429cdd2d4c *man/dataset-numeric-gd.rd 038efb715dfb611c810de6656082aacf *man/dim-GGobiData-ok.rd bafced2e563e9a884787f070ee8fc7d0 *man/dimnames---GGobiData-ds.rd 5c76cb4153c563697608515c72fdd6de *man/dimnames-GGobiData-x0.rd b5fa10c2935fce5d91c5be441c03f398 *man/display-GGobiData-vz.rd a2a6ac0fb455a23c52905f256bfbf97d *man/display-ce.rd eb33e69664b02a89715137624fa09f90 *man/displays-GGobi-n2.rd 53c634ec9868ce9b274b31ec3708cca2 *man/displays-kj.rd 8d6cf3150214f0ec07de1b5eb91316a0 *man/edges---GGobi-m7.rd 7e42cc241a52779e5085dac0d89d0fb1 *man/edges---GGobiData-qe.rd 88fd18bd592029f2d0a06ae89eadf2a2 *man/edges---GGobiDisplay-1y.rd cbff8ccfe7a4f9509a18cf6ca6939200 *man/edges--p8.rd 141b57d57b09beb112f045b096d78cbb *man/edges-lk.rd f44c0f7cf5a1acd48d13f68862e14863 *man/excluded---GGobiData-3z.rd b235d038588c0ddbffc0081b7246c0b4 *man/excluded-GGobiData-ic.rd fa0463785a884eb0652984ead96cf824 *man/excluded-ec.rd aba71cd4de71024fa463d5ff2991ad1c *man/get--GGobi-7p.rd 190b3ea21da15a99cdfb957338483ebd *man/get--GGobiData-9v.rd b231401c2662c2dc45d53e9fcecd3b64 *man/ggobi-GGobiDisplay-zh.rd 8fe988ff3ddacc1ab1c400c349ef8dc5 *man/ggobi-check-structs-qq.rd 36c962d80d3e62a2daf36bd8eaec7f1a *man/ggobi-count-u4.rd b0b2e7212fc71631f1e13e3a7ec78c65 *man/ggobi-data-add-variable-xu.rd f30a8d133351067b9900de5617e7d0bd *man/ggobi-data-remove-variable-bv.rd 2d7f127c9a4ef5bf6eae953a01354eac *man/ggobi-data-set-variable-43.rd 7b8f7286efa79ad6191ef53d1faea3c7 *man/ggobi-default-20.rd 6e41da3b42d33406603dfda5e5887a4c *man/ggobi-display-get-tour-projection-p0.rd 289a0743a78817861abda9b8493d45d4 *man/ggobi-display-make-type-3r.rd f3e0a759caf831ff201eff311a826cb2 *man/ggobi-display-save-picture-bw.rd 01924bd093248cf37276b5762f1a77c5 *man/ggobi-display-set-tour-projection-2n.rd 2dd4fbab3817f2c956b11d96c70e76d4 *man/ggobi-display-types-9g.rd 5fdb5256486f272a53c33be5c25def60 *man/ggobi-find-file-fe.rd 23a54059159afde690e8a540b28e6bda *man/ggobi-get-2m.rd 9cfbe9cba0ea697593ea4f1934aa2248 *man/ggobi-gtk-main-window-l6.rd dd0fb5159570b46be6cc0943d7f0ea15 *man/ggobi-gtk-menu-bar-j4.rd d6693f6b494269086b0fba5e7f56ffe6 *man/ggobi-longitudinal-2e.rd 48f444512bc8b16b0b02bcb682452afa *man/ggobi-pcp-c7.rd 65a57c7295f0f9c5f5377e4870df5720 *man/ggobi-set-data-file-be.rd bae48cf4962bb83d3b007a947e228f71 *man/ggobi-set-data-frame-vy.rd 63f07818029ac720c562a7b2ad4183e6 *man/ggobi-symbol-ec.rd 8527e18b97397a6158e82883cd392d16 *man/ggobi-version-ao.rd 1bc62603d4359c914d05f3e78d75219a *man/glyph-colour---GGobiData-u7.rd 668d1a6a09303c8fbdb16cf99c561e1d *man/glyph-colour-GGobiData-p2.rd b0dc9ffa29a7060db537b942fbbda984 *man/glyph-size---GGobiData-9w.rd 6c93bb9715a253c56a35a1a0e529a315 *man/glyph-size-GGobiData-3t.rd e796b922bfc24da55b49f3c615e1febb *man/glyph-type---GGobiData-r1.rd cb4f7abffc86afe06d308c758285ae38 *man/glyph-type-GGobiData-og.rd 9485d1127837336c0316336e687a166f *man/ids---GGobiData-mw.rd 2394d31b1a627a97c09542dda3c989eb *man/ids-GGobiData-yu.rd 31129c733a7bbb16896fc7a48d1d9612 *man/imode-8g.rd f72eecee430b705922c9ca6a0113466c *man/length-GGobiDisplay-gt.rd 6448912ed4f4f38e56a41b8d682093ca *man/mapGlyphType-t9.rd 1c255f03b5c66ceec025424704ac5ea3 *man/names---GGobiData-p2.rd 4e8619134ce5db30c5351a93ab80cc0e *man/names-GGobi-pt.rd 125ed36861574927021874034154896c *man/names-GGobiData-c0.rd 41aa8d5e109d81432068bbe4389a8146 *man/ncol-GGobiData-p3.rd 2714ba3d48e54ddb387ec18f97b49ca6 *man/nrow-GGobiData-om.rd cdb498dcaa42a9b5f8ee17e1cf60bb84 *man/pmode-ix.rd 42eda8fb07b7881d7284b6cf5c88706d *man/pmodes-tc.rd 284c7af44d6c380943c106d6a9c17dc1 *man/print-GGobi-yo.rd 8389cf19753b32fe8bc3ef263ac49014 *man/print-GGobiData-ja.rd fab8939cc98698bed611a5c657865719 *man/print-GGobiDisplay-o0.rd 43df4d96c5b081ce1effeb7bc5b21421 *man/rownames---GGobiData-rg.rd a4b73ed722249ede5c6bfd160d1ebe5c *man/rownames-GGobiData-pv.rd f99ab311ebc5e038cdd5949a6041327c *man/selected-GGobiData-xv.rd f0fa550fc27e1c19293c795644f70335 *man/set--GGobi-b7.rd 07f8aa368aef19d9a9a5821971c2381d *man/set--GGobiData-56.rd bcea81991be0de057f97f8dff120a6ec *man/shadowed---GGobiData-h7.rd a61c4cccf1e07710939c41acd6792b33 *man/shadowed-GGobiData-8b.rd f596c073b6bf501a87056d00e44de3f6 *man/stormtracks.rd 332b4349acc56c195f80952d9099d779 *man/summary-GGobi-c4.rd b15a6fba1207a7edd8f9e2137dd9d5d2 *man/summary-GGobiData-mm.rd 0c0f2a666f97da89cf5db695520c877a *man/valid-ggobi-uv.rd 90763938eaba45b89c04db5afdba44d7 *man/variable-index-h9.rd 101553a3f22a26b3809dd57647d7a0af *man/variables---GGobiDisplay-a6.rd 9c24f1b24c5c87b9940a4b8d482e3f3d *man/variables--1i.rd 9f20ce466f432a36257e2c4ec505491e *man/variables-2n.rd 5b9ea364220c39d4add9bade3d83638a *man/variables-GGobiDisplay-si.rd 98ab567de3aa0a576b553e344ab6aa65 *src/Makevars 16fda3a440044a4820c1cb85606bfc47 *src/Makevars.in a072d75110bada2a34f328d6613b3e6c *src/Makevars.win dc084c23e20ebc5f9f0fb30598a529fc *src/Makevars.win.in be32057fe503d87e729ca93a9a4bf424 *src/RSCommon.h 6f22dd2a91d8cda1d65aa52b72114a8d *src/RSEval.c fc2d03d36b41859f9b6c16b0dc61f93b *src/RSEval.h 898331525f80977e3aecf4cbd8328fa5 *src/RSGGobi.h b733f3a34d455cf55b56f93e857054fd *src/RSGGobiEntryPoints.h 56779df7e232cecb4958e182e415d3c6 *src/RUtils.h 719f3c89810b429acbbb1f20c8f9b1ca *src/brush.c 143991dae3ae6948c9a9678eb22bd1d9 *src/colorSchemes.c d4ad43d88109eb868e38b15c5f1ae86f *src/conversion.c 451f9a423663f768e9702b9515945e6f *src/conversion.h 10242eb80c0e4ce742e9148d5491d3ca *src/data.c e6deb4bd65e16b0508249b3ebf601683 *src/dataset.c ba19f106705199bd1cfc54779b284977 *src/display.c b9315a20f1a87f1435b59c71a8ed8679 *src/displays.c 00f0c2bad68a6c301521ffc43904694c *src/edges.c 56f15e1e538a80c7a05a9a3ff7a1a543 *src/ggobi.c 501be43af639d7b287d4584b50776148 *src/identify.c fd1d70ddaa6251c9368e9739264a37d6 *src/init.c f8f56656cd7050d9d01994a83e7c2013 *src/io.c 1686daeaefab0044430ff91e2ec3733d *src/keyHandlers.c d0fa4946683419cc6801de172693ad88 *src/longitudinal.c 36fd4e26538d7d33e57c82bad999814e *src/modes.c d25a27912485495e9e102b95636a947b *src/plot.c cb71f5162d11f3c59e9f38ed82939bdf *src/plots.c 5d8cccfd448ef21b7aa9688fc13dcd91 *src/plugins.c 7bbc173f2941deaf4f7fc5208084cfbd *src/print.c 1f1493e84b0163de8263e0f8cec0543f *src/session.c 1bd91a4c39b00cd10b6733bea83577cd *src/smooth.c a8c26d5ee1663a26f915cf8ed5cc004b *src/ui.c c3b89311eb343b74638735fab5f79aed *src/utils.c 13ddc0d0459348237394bf8f5c953f5e *start.r 94061be48e14cdb25aaabea6b4572ec4 *test/data.rtest fa8f0f1c4665e1dcc459e243b8c736dc *test/glyphs.rtest 6a1c7fa8b7528ab8237ff939471b8251 *test/next-version/callbacks.r c8465032cfe4ea151ca45272b5c25349 *test/next-version/edges-all.rtest 0fa1df1d72d6dadc172afe024fc15a7d *test/next-version/edges.rtest 075f2474cc75b0ce908da4624eea20d2 *test/next-version/gui.r 681a6d7b68b43b4004fdbcb391f681b6 *test/next-version/gui2.r 00b3f1522ad8fbde73678f0bae1aaf4c *test/next-version/plot-layout.r 3c88a963b850b0148c1a18aea99fa846 *test/next-version/plugin-radial.r b2eb3dc0e10a119bb3a8d524dbe630f1 *test/test.r rggobi/data/0000755000176000001440000000000011772563330012473 5ustar ripleyusersrggobi/data/stormtracks.rda0000644000176000001440000015330311772563330015544 0ustar ripleyusers eGy߹m[~;6ݭVwՒZRyX 4ǍĨǚ5YKB֬ɚg&$J;Cv16ˠ`@`glŎdn?u=uz꺵wW}Wu:v7뾱Vʟ}uO}oo]gtEJG/oB:LsENłggsLL-VS'~ĩ4Z?}ƎS?qRlǩ?6{u{|}NsbVo<~}jJGi+N'O'sys߉g7=?UW`z U|)獾y֍'DԼקg:SVxJ?l׉ή©]'VƐw{TiN}oMo9zϸ魧OQNHеR'_2>mĩO{߉{ސ!vߗJGNg9p[,9XsBl gq6=dy"=~ߏ=Q羓}o9w{}5t|7J'BɛO| JՏ[`N̤}g'>4\m3 eN+ Dn9q73/iO̞1O>5'O}>:jef}o(G}̊U'3bmR ێqn!晷qS=5yozRM\v3s[W@:9{uY'T^<ig y֡_3 WYB' Heޝ'8M|7o쾾_,2-2-2-2-2-9Giiii.pz2-S oiii65iiio.2-2-2]eZeZeZeڐeZeZeZeZeZeZeZI^eZeZeZez,2-2-2-2-2-2m[7yTz3ikL40J=֍V2mN*mD˴ב6˴fom☷j9e6oފiil|lHiwi+.~l\ '߼p<ĭVMmmvbt7{>[g\*XO=glzfei2]:\ņg#DzLi\k6[-2kl]fy)\Oz*zm/2-zl]>iqwyelIO9vL'mUD=ާJ뽍H[mݷL46{.Z+]q^\eZE6_^a#/W{+MYeHv1pHkef[˴LOŴK)e|ENa*{OZktКr#گ-U*}[JQ?QgW;]U+WҟsTtχBH2**]y>ggU:>[d6kQLlE:ܲR9){57͍E|#adBf֍+/o\t+=7?Uy.rc^T\f7%lUTi/U{Bڧgwϭגyzm 1sbo:͂om%ʺ\x雠߹oƿȸ>X0o\.}H|y1퐋KM_>B}ٶYcl|t`+wkz` ;wl.6Lj=r[7υ/cE.~Y?fڢµomb͛B)q5[~2]h<|.o/BF;s.8ʅs+7_|>{syB`+ݦ;Ka擳s#`ڊk̳Ч7j~ 8W[k饍;C/}9VٲsA.8ϷE"EB1onq- a_l%lﯗ6.<8Vo3"j粭4.x-.E+3j_.*\ZpQʅ̀cǼ:.zfQMJx\h+ߵ"k_öR)/ s-/,R^oEu"r}/Ry`jERy`Xlk3ߨv7c,QmmU^JEc˛"Y^9t`\л[ Q^8Y<{ӥP^6m .ÂsEBs-/ bxEes͂yU:/ by=uYwm6fZ^8jya|cތ_ U^8.Er?fƱ4?"rEB/u"wʋDz| T'F_fEy+ V^8V+?"KG. Smw|:-Ҹ/=U9hYXvˋRο(pKy溍V(/ U^8.ya`*/ [O`،q!ʛfyyʋò<\/ymv+޻}K/~:̶Wn毢 N뽚kGmk|;ۧwP47>1kD7|7+ n?m<9oҏkGr~%9ON󝼿f|{^޿_RQeWe_Nu_AS/@~y&x~wWi;x~=M%-JMX>Sʯk(gV塃Bz 3thO:kxZv1|}FFo i/??dS~1^kg;rskyJ޿vҟz{۷÷O NI=#9zfv iw<n.^Ly8o5zyir:]UeAȇ@kK._/_"_] ۨRڍ^G||Wk#Y+I9zy.ދ׈7J΃gstyanCN? ޵:zey^A?·G~Sz꩟JEϨE7AݔPދw{iOb/t o/{(gv^E5foիCk*1xfoGYVC1K?/]ӎvKsJgwxR_J{/{x~ze$r׊ /WSj_Mϥ<<(Zd ^[ȯ K9tu{!]н_OYyЮTGu룝Qkf^uO[ί<|>%xWMF_/;ez+}v2׍>~;mzh?iOigE/=8v~-FyG}֥C]E=-Ӝc˧~<~=S_h[N-6[^Q~9hg:g&o[:@zz;P'Џ6?ϕGOv|.ޜԋO~cR/x&wݥݠ}#z7S⻫{)?s|?ߜ;||';ѧ<;f^}Za}B׹#tC<(H ㍝Cyx?/\k>w\ /~q:38n_J='cGbgҎv`ݖ7V'#ZzΣy37S~%pdwu-~*Wq_Hn=~/~_OxLf[rU?Ư w#~upg^Ywz˺|?tG:ھg߁^:;Tt:b(WOo7zo#i'ݧy{˼p׼>MھVOk?7}N[(k.q(k?Ӟ_9?:)V1??Ⱥ}!N;M7u^]Wy ɺi?ꇱI?^C󐻯v3톏sɺrG]3΢7B~._PWu;SyJ{#>ob/fE|l/Gʀ+ _ ?eԋ?~N bY_$q<ΛE7yϸ8ڍ7SV~ WU$N<>3Oʾ3p~zJzxxCz8;<:W7G7z@9,Ə8}u+r@AoT^Cɡs -^yuyt='#w1.KPރxaN;YBf ~}F._nP^o>v|Q߆:ƞ'ߋ~ߢ^w<|\p&>׊fgW~+=y;.9LM?Ae7p4r΀vw_%~':.#o7Ə'uzUzI?އnYڍ]4້~sC=%跙yO&EzI#r9ȼlN{[vI9 eMxnM^8?_H00\ކo}~"cCė|-?Ǵ?za!CPvxrs\r}6q:~#OC3"ڡWi^Ow~)Eە>Qdq>Q}<{oƼ"Mr&zw_=!WfWp&^QZ滜ϑμ:so{nuCֳ=}k:ȫz]>ͽ>>?yJ>\c="@}<=xu6ayk/]3z_ύ~ /z>z{R=Ww('ރ;'.bg?ãV?>7ﳟ!"Y~cOnʱ'gMxhv>k]}~iy_-}W×|8c!Ywjj[y>^W*8};y[~!U>}/s[]s~z~Ϟu@cU줝̧ksy񷞙G[rnq>_73ji~Oqf>r*kğ YOG9J]s=4,9O~ZA?G짞L)_zv+e+VH>=#ɇ ϛ-9:?~9ߙ7<:xM2؋|_eD'#=}n.c%^𾉛=I~̅G?ߧJ+ۍQS?7zNE7rOB?x}oxy>Ͻ%x.)R|<|&?Grvas?9sN~G(7XYf7:NG~B<5j"v/G9=m9|1esķ9?g##UYCR$\q=/3Hx+ʗپr^.ǮVno-?:?fW7FFY7/>MzOKO}Oc[|pg}{cS9,ߝ)Ճ'zMeK^Koy+'繗[<4kcx~c;˿|}F'ʍbN?7E`kUO<9KͽM̺G WkC< ]gziKk9N兼>i֜L^_'m\y}n˼ Gw~G 5q2> tON?%7ܓشbtU3ƙ2X?'k7wPGF;B٧yܜ^z^}{or䍿_=L9 ع1z!|{3|{ܯ$][}}=>m}>k}O Jo_xne-~KLk >|YOˏVKM<,󼾇+|ƀ3}]T/B7Kbk~N~Z.f8J{%bkdVQOeWxPnǿ]ǞS/P?~L8zkcK/n~Q~a~s~~*÷k/gWߋNK!z| W][px&/4SP}Wg9^qWǻ('N~{ o7“9[2NѸ|u|J}C*9}{l/Z~x߬GȳUy?qf^fCw'yn1x>}ցig(QnoSŔ':x~w,2|7$=o4nwk?{dZ?7'N'd2{ɼ{_kzKgk}J7t~N{=G9/0~ ˼h/ز=zߪ<3TW>ؑ_HoƩS箞̞O9p7|D&8ϩ(7~4yyG9o2kD9ONϿ|ڟs]Y8xjhʿcqo~n #P~i7UMъ/^䱎+M x¬+?#{/8Oɧ\8c8ws&8PxoЎfy7;z"9N*p/ɕk=gU (cS yysBtTwk'TrM}KP~Vzw6h/J9pصwޮ׭ݹ߅v{FrܟFWV+yڍ~}sF7ƋFOkxhn} ]lOWۢ&D}EG7Hjcy}/YwsO*FL/xS/#O穗{CO~{ʹk|~rxO聮ʯ"yGgsޜ>7wWiCď<_@9z^)ґ{sG7Yo3?G.(y~ׁ~ߺz~6zݒ-MW]PD)׉R&^yzY?z?Lj=J{gY7/'O}|RO\|p}o&x9>-kb~s y}x~Ǘv򻩔s<9TߨϨ3r~捽>I=-SC[f؋/ܟvKXs=w͸G;Y?Qɿ휙N^\=}c}HBɝh?Lެ?|D_\=r24sJsdH{&V;;9pY?kj7+WoYw~;\L{Mxo~GyDGus>9wP/I{Y_'cON>z^SO[GByB#o_#^-yYQ{h|%OqƟu)A+==FoޜոGsWxfU77'+('>W?o˽WЧK|ֿT9G:>'|7ƇϲvpŎ4^yc]C>]ywxv3^X>Ǹo{+oc^B&Ȝq4shxOL?ٟ?P= +vek>q/>tKw(*wl_syvR~2/Q/'~Ƹ&Z~ s\<|KZuP鯹ߧwz|6yCčo/?nܫC}tv×'4C:=;<+<{~r^伒y_̷R3>O띓#ɑoLɑw9Nw+9['Q}&ߔO&x>x8?aޟܱq_ /~/drzg<'{o7xn0_M3NطNG;<; ;iN~'x:FǮ"1{g>RC<0ok^0(=JU9|nG ܄u{xBЄ Ó|; 7}n93/7[~H4օuW3FGcT|[;.S#ةG4Lww;pFKr A ۄ ߍÏlB|?d7>q'{3єio/߫Wy0)4#\S7?.֟Q'7w3̸l6>o'ry>"yeMOr%\;oup[筌V?"w>}o࿚z!~ ~ v ~ r&cOw|,xCCC!0zx0|tӞaEonsNae}}zm:mr|\'==ʣBȍ}M}Trw巊O}ºa:eºe>?u؄ׄ> q/5EO޳:٣p5xQ^T^?'籛8c/z~o6"秫2rqO=|-PYGW|;IScx|C1FK|x =qhgCgyyl2G!=+v=>3{j2ϧ??;8x̺|{y]_8^87`d;W;}ԯ~9_6["GYQmr }~մໟrq|;/欄'p;Ɨu$#s֓ua}ǧ7(4!nhB|d3#!ͺSyÌ0}zi;x=_'>C(x ]NN ~|Џ-yy|pu֓ʇ`vv60;&'Lk|!ׇT9N'Apş瀣ם'{]W3 \p_]}A|]B>b Wu~h't :gC^G}[_ ||]Dw>߹tcY}{n |%_.E|˄8 sY/iwLNX&72៬ K/|*'n+fc=>2G?'ć!%㼧M۽r^/Gy?8;+&ăL9;u&g~V3Q֙?A~zzO}';+*h7.&čᠿ;KSwC;8c#;(}yxqJW~a^ 'fT/pi69r}'?edu0eywt'.{+O!e'p2vǶx|B !'^+v?r}SK^sYP)?40ww&VxAN7tsy\ &۩bfS/}'3ʉVǧ?Y?sA'O )+g?E?SC;zSF9D&.&v3#_=a~ }y-tl7L8Is?67xy >7Bcow=w]i|#Pf8hWk-O'0ğr/wNw3̏;V]'}C^'߳.ry_x8S>%p cc'>/GvsݙW~o{;ioӏq)3GG񧂧a9p;:>z8^#!z3{>8 䌳_cL.zG~}9cM{Exq78s~w]>#x_=hN}ԛ35V>T7Nspބ{7&w~fp݇쫀]bGGnR%*|O~F~x(p;p54νǜs ~6 Mk}ٓ&NmmwRN|KpfyO?\Ԯw|W'eG9yo;} 煛7峝_~;g? z|%q۩8oϞ֏/BƯ >&gʹLs;3A?x+y0ksփQ50g!<~=.̓ P{&%w#C?)OeO }2/U=ow/ލ>c|ro#?G? |hsIS3קּވ]'y}θ!ǐcB^Bip~?~9s!9bџ-g^+qe㜳.GAg7p< 9P>w@~g;y?r'F^5};N<ޤ=%^>:v?w'|/@Gk?_R>_ 5A~i ~kh~ ճe>/]xy~vF9vjk\.ؿ%syf?+e_^^[;}snA}&g3=z~' {ί|inZ+qƑ=7ALM~pe"?urDgN3qr] go9SOOzYw='\ snUS_{:Us~Sq gOWρYGَlj'č}Z_unKyu<0#Ч{bxĥO&O|nAw'% ~^7"wB /^a|3_ΛQ/x/xH$'H.y>|}?D99>p?̯GyvWO?;)g 8N;7O_px<@{~5d]弰)g=ڋ{ɝg2_k~i6nb4g:d)}; |r8' >GʺvP۬ x/ύ#m*y#E;J%NEgGrΓr'b?1㾋~}_/qP'#'A7/8޻o~$Gt_&㔅 WsdsYx/ʉ/_<Ͻ^)ێmT|Rg>r~C>-?|;3|T|1Y:|&>!YR?<rs~EO?O繇vDuWsG|zݣckYF;gG9 =|cSO?x.|}/}r9޼A?0Oۖ/ԣ澗_UɁ/v,L< ?E_?G_ٯOE^?#|XC'绌~3o_<r^:kwѾwM?fDBkα? eBs3g,ex<bg?%MnbΟ71W+qB7>>w޸̓) e_qgd|oz[/ "9YɓĽI|ܻwI˟яOሽJ{ٿ{2|++3s9~zzr|Fϡ/s2Xx4z'^?~.=_?/h L!_u[)ty;B>r^ xr?|/Ƴ$XsL?D}X%&zԣ`:ğc=i{w{wɅ>< 9Qd|eIn_<': uj4w^ȓ;ۆ}gC'ǟeM~IB6㊿\zx[>vr^U噧'q3q/gsz f]?*]eOM<K8xlK*WPkQ?%?3ĹCuB5s_:gnž+~ B;ܣ4A]:؁C/z)"Wֿ') ^D%a۞r_J[眅_ppeD/RN ݌O9s8F#qcm>~G.Vn7+v#|xS\T{M5{}F7/L{A J'W~~79kݒݼ7G>GcA/uK+C=ɼKT鿹g>=Sjy}Dw3Cߡ_sEyzlk /ߧ][xx}w)|M>{uJ|%ğр/w^Wv{ǟDtʼ?5=%~tދvrf<4% x2~^?|G/Ǭ3{7sO)5?%[>D&Q'QGo~;oȑrC?-o;ՋC~/Ɵ>zkg}HPo4 /"I-3j7:;r wg΃Iox7ro:p_ȸrz&8COzDA{!_7M6if~WΧ5~S}+|9Bp~ࡽ<|~Nc7~g< gWvTm~GvM&Mbڍ>l>a)_m<} +rŏ>:Y#O}|"U~')qCϷO^s}yW?N׎ss]q=t>ړ|ds#W:=wg |*/Wz+vB?:_Fq$.b+gY>w//vax}G io'\#_7 ΅7^!眞i}95/ +'zʋj:د<*ґ ^C:r9u+Ӯ&9_,҉KS/~H+6~s/:tr; wOsOaMJN7ʽ{DWE.vJG~0?9_'G_=_Ƒ~N^#NֿGGd?8;)) 'n8GAi(>^೬h'"tw]2'N8{oo*5"r9_X/3O;Ổ>'9P_?eyw%i!.w0ޜ+|@IY7%jI/s_zCyo\?N<:rOFcܣ؃ Wf_.V0.]4&2pe= 69Ͻ7P"GrtGe O#=;^˸n$l~G/w]I)7h+s!3_}C=뽺۟/=wԏ/=I?2__}nƙ3뺻iz]QO/>gWz=D{wRos?s]7*ggWA0qdD_׀$^81CI/ /%s{\sDsYx{ț{3ޠ^cOyr> @G=H|;xOA(w5#У*O/m_M'O::o?ĥ"_Y"G_VO/>Ggxmq&nrl)sSh?Fǀs9G_5.~@˕{js+rb=ȸbA&o?i?GO_$H9 ;WΗc7Pn9ᜟ9nG>?ݴU-W& |$HO<򦞬%iھsMz qM|0{'h7hh?G]e]$Uog#wʸ8aɜ;=y |c'.^^x1σWi=9M)|6;{H'?zx<เĹ_}Ctg;|x̧ZOġ |9|9|c~{?XjZξ2R/ ?z&N>ha6oGE|xN KY~k)q?@\qїѓ3"?7yg7o3 }܋8B_ gvǬ}b|2 O[.|\$}{k(K?S]4s7G9q-o>wozg=+++K+wWVﬤ&}igӧyJ-OPY'qҿ_Ih%Jzr%J0 _>K};['COU8S ~Ek$amݗkw=m[I>4JzXJ ~wG_-hq`xt%J[IJ+'Vά^I?~H~y%oKz]kp *n^>>xZ^bA??B'=O/t3R7/D=UqC>*cL~QieByMyKݠ:ErՑTY})ѐ)uxH_f:*8RU꩒Og~jvS)~'$,W?Le7%u8Xgu=ozyϞ~mgW|˖>yYyTl7Ҽ泚߾oυ?}w?I$_acIy Lvt2ُcЫ3B_fsQ=nʫ?6z})`b7/{_;kZ7;ʤ.nޞ?ڵ^t7z?¸!叀u6˯ JGKoKXDYO/q"h/j~8{7oKH{L׭/w2Sӭߥ,I}X{Wϛ=jC=J~W[S>zowi' ̶LA+eҶ|7:}> lfXӯyZ?x;>\ཟJzH~tn' &5~I}?7._$m t t~St*K UVZΧ zǺok}ٵ&帗_? N{\3+`rn~^V5PR=$i!2,M\3~Hfkny]uyۤ56q g.{^h=5p_嚶zh5;AGIi>JǺzudN@7[},6g'_f\kyp<]·IVKzX7[q;1j{|[$ĽZzmhK> ӜRCKTŔ/vöb9k~L~riSkǔzĵ:I9F}SP~SYr=ݼݼ^+1ڧxj^|seDߊ2V>~~_{V?ϫ =<{K6:L'ˤo,KuI|_VTOZNF?m MKݼ_纙>eRw_WGO?=#zųcmڷ/D<]J['xP/;Jy;LtkTJ~]?խVYz]y^oOv3~~}g%͕7VWW̳wtӵuw1z5j{scsKקoDu_Sy9-ByDcX.Ro{efx񌶵{&o-zK;{]굳=o*k=:{ޮy早n~J8tCI8{u*TLuϷ:姻:z~1vD*fC~_fsI|?R7ٗ>Sx_t3.moQK[Sc;;}ryh|ۃMTu}>:@~=/Niv|;QGŇyn&׀pc/O^ϑ p"f{$~EqnxnQǖ{l}^A%|[* \`SgicHtsu~pZ㕺C]k?d7=l?؀==h~ֱ1OiwZ:W1s>D޿>?훒ooݞ1zUڝC!;@_%ǧ1 K"ߗrM_C--P\t-?OWl׺#T|)jAնFxGvf:?+ڦR*t|7#_-hQh9|?h\;үv6VW|b?Ot7ᰝ~.P7?Gz6F=!} *=Cvl0~voZT|nGZٍW1uq~׼ZY}[POO[_V$s S98/ ԾVi}ھUո rk~_O8v3krb}nG=WʹqY\k2^ĥ4WR/^H9Zϖؑ1(Kj{Ckl\ۺoy-㌵mGz^n~]oV?*kϏt䏒.gZJPkZr]Z)u^iwq7%_٥M E?sz#Erֻ_+_ྱ- pTڤ=?|\k2cjKE|q@e*}MJC:Z*-Ӗ~_>>֦3sr׸Hއ9mOWkk;דI*k7`R?e}ή7='SK1*aGꡒϵ W/Ws$}gen+^\ǩ8rNZ:LZ^KeeתvhZ]Y+,}2c")})[>Fw3=˵g,V/eW_W|nLSJJ|ć vzђe\2Pѿ,9ɳ>$>W~^z9oǤVDse,KuoƍKuu__ƪgKBR*kޚn9ٽrǡ|g_m30gCv__?nh~gwsΡ} e|ОQ71ϥ|~)%=r]W??*R'A~x=w?|IͳO~r;ݓ.^u_mo1Q}] vp\Y=ǖr/m2.׶Viw C0jז>.<>oWr?_,Kpȗچ⤌(c=?RvxIkz X]oSΗ,mWKroB_i;pjP,[*vyTߋPgt7'N鞡BKUQ5znvuJj>mږ gzM{ȸ{N?H{P/z7`ѻ,kl=Tދ|X<33 cejDCx:N2*.gj?U&?,cB|su^VcXT c=!erj7!Y,2]71kJԗ=K_྅=ۣJmi\9Qavўq46~zud nzuS޳f&5+kj4nfqY6,mƺ_߿!ж>nvR_Coq%6Ϥ{I^{`77l޷\w)czolΫq;WG]CtJa%( k>M隢P,ҕt-lq]PWU8ʱ\Wm18֓`~:p t@*9 d, Z]VW=+J1P:Rh5\p`$e>Ax~7qQDM!qrH5^I皾%,CzOT!z:ldgLk}Tt^8L׀NG/^%:j*:HOn^k~,yvJsQ֩enLNkYWɫmף& KR-c}M7<(+﯆1_k#/d^ϕAM1[u-wq쳄15wtt\+eCs[=1Zw<\;Nj>&5C~nu-Tth[/ٿok!ۤ曳Met3R-7Tq%_ۯ>r]pdفUdۜ%ǧ:!]X ֈC8цďso>B^>?\?IN?<|EֲaNC1;wF毯]έa8km{kRcxtT'Ǥ<^׍zҭR_]G2V$/CLJݪwh\m[N,?(C~k읡u!~༮+$y3@璾u~_ʗ~39{h^'f3>zZ˯8$uAC{wwcv:5;[F|m+ Ϸrl]9F|^PǘyV.ҦZMv ]ܱzoHO6Ǖp?1j6i ͵|7}5/־٤ڞ,z5ka(4}CQu3 [K<=z~|o瓞̒sFx(*G'w<We5jZ8k٬5n Oc[cP^mm Ś'\1vN_{֚c/a-j_ ݼ~G[KI^_Z/,~%ϗJY8mM{õP nXkք%N}Z,t[ csZ8 wewkSի+WYg9?jloLfVZոY'V㽴jZۖ ͷ]SOնZxUUʸ:ѣn\oD14ŐixR%c1wcByxFkq=؜zMh6$O7tC7X c!]F!}9c:_gcHzoM,K^flՆqۆذmن\I?hωYwg7o+DZuOn>u}uMo~w w9O_;'ms=h9nE680i\0i~Nmq.y19y[Zơ߽cI6eT^CIS'/ovo~?_=M'~gMװ;VGe.rQoix^6}Wkzk,uRm{Nʭ'=c~zt6Oʄ^r&~:ug69s}w;m'xȪM9疿jH{D[k6}g&cQ{^"]7GAlX wlzeӿ'9n~|Mn_yŰ~>Gexr&n6}gI;rܱ;|?sIզlJUp'ɦrCr:s7]s='M Pj8luʙ}>{۶}&>Mn>G䛾B;NqؖݛMʦӦ6Oby%c>_YɇƏ7}Ҿ?o.}[y?3@ݴkeM[^Grct}5C[朾}CBEmnicݔ kn{m_Yu}P8KGiy:iNƓ_/QG=8-WY=ǝӣusuUdmOsoEU_uӲ*e53N.Ӟϣyli]Ytwu>=5iw/OGgG'姓swi实8^q|ُLgޮo q9?:=*H_v^Ū];u\w.cϳgin箞geQljqLwL8/Ϻq/{<ɏǝaI}v{_Yio}?j]ֶ6< "+/նssv]{gjk6f_Ow6mqUmmri[~9vqϻ?gf/ izsMO{_ճD;O'mYE2}rI5zclp{[jL{q>ϵz9۴uǧ=秭c~e=w|uN\\^+ga_3"t㷋~CmEF:˺YQޮogzQWyljk]ntۺޮz]vWPWw#{]?|twuG]]`W븍gُB~XxWDW??׻]3]1?ՏtY|W=Ǻ]]ŇK@v˺=e*'[<< 2u5w]]t>K郲g W5c5_]U3z&|=]m\Ǻ]ͮ~?՟Y_ qY+:MΟY/.xv}EȋAW}9{^j}0su|emEdޫȀntC]HWjWͅ?տ՟tt]'Ʈ_.wt㲾}ڳu؆>OU'ru^7=w:a}\fۯb}v\s/ׁ|x>_]\pVⴿ߸19{+2>+~.|㞥9wٟ4uisY͋~:|wE~vo)v,_wa~\s2u^k{/׍|;!B_tծy7{?~tveﰽ]T_ǿ?^d>'?sUXgbvUˬ9Fzr\t?=+;O.<;Xgۮa=Ya+^E[|ZWT}W;gO_=c;_vK)`Gu︀x]g%S֩O_KKPO_wT){;]W\˯qs[[Ww\߽e]A}%+yIT?vg~^qWP?_| /_RoP~|7\zOqׯq[/g/~%wa]hz^;?{OnY? OO}/~R?q>s}Asg|K_֯ܢ~݇O]b}93օg?姼7OYoP^-.~pGCGׯ~) ׏>E{C״5?E~?O^RWP+\5?Py /_˭z.Շ~y|o߹w[V뱗>}8tpnǑ}/n޻,;w,&}pЃ6~frr5n޼sgbݿ؜O|ݽ]y\;7.Gn|g1瓟=ػ{zknbo.Vso9X?x$[5p{wn߻bϿwc'>߻<9#7ݹwyٽn,c_[n,.Wppͷpb_?pu}rK?Žܓݤ{M{ot#OWswwXq[_>7K;`y=K덃%^z{2C mR&Uhcmegd Q Q!4eƖ!4ZMeYgZoeUd %[H2Ch.2D2DA2FBZ5 Q{ QU,ejB+_g- Q Q:CԚ+Cqcд!jZ @к!t-2Du Q[ Q=!jCZr!!42DM Q!4߂u(!4 Q QjgTR@К_5dZyeZe: [Ђ2DMyK*C~ Ch=-Chz!4c2De ]l 3&XeXc!4 QW3ZU]V; +Ch[˭B9-Chvp@Ф{MRB#-Cf3CԚZvu}/2D-2D u5RVfeۤ!FM Ɣ!HjS&)ChR-Ch`!kBK v e(3D]dZeeڃ!4e, 2& Qkn Y2VZL6S.u5W i-C Q u!CZdP^z CԆ *Ch-ChReT&)Chh!j3!P0ChWvΨ Qۥ Q[ 5&= uȣ ? z!b1Q6>bb1azgjأ XQX<0  Qeq<)2r`yhZXLz!G{2{!b1QXaX,u%0Cp͏3[eŴG(CpZXe.evx! -CpCer3b2b I3'3bh2Ee`\ ]|3gn:Cp+ZXYk+!ԣ S XQX,xgNyKgG<t=eŌ-Cp2rb[*C,& эXe [g^I!-z3wy!otg@b XrZGb1p{8 tIgȣ ͮ 5=l2oe.(C y!88Cpq6e&Uhcmegd Q Q!4eƖ!4ZMeYgZoeUd %[H2Ch.2D2DA2FBZ5 Q{ QU,ejB+_g- Q Q:CԚ+Cqcд!jZ @к!t-2Du Q[ Q=!jCZr!!42DM Q!4߂u(!4 Q QjgTR@К_5dZyeZe: [Ђ2DMyK*C~ Ch=-Chz!4c2De ]l 3&XeXc!4 QW3ZU]V; +Ch[˭B9-Chvp@Ф{MRB#-Cf3CԚZvu}/2D-2D u5RVfe6eӤmL !j=!j2& Q2B 9 Q Q !di@Yf2CEUV=hBSZ ChR!j!j Y-Ch Ŕ!j3!ZgZse:n2Dm@Z2DE!j!2DmHZ2V2&UI!j2[P63!j}!j_]Z˳ Q+ QK Qp!`Z~wsU)uwIede-^12fw0@ maФ !C`2Ɣ!JbPotg`!`e-xkU5e tI*ChelfZSEE[!05RF*CԊ& T)C!ڟ!02D2DMRФ!j[:Ch5!4g!j!jW!82lB#h# Qf6-ChJ9XdMj2D52D-VB!4e|!2Dm2D]R Qk QǍBZ h6BBӵա2Dm2D@ iBU[Ф52DMR~ *Cf"Cԡ` 2D2DQKBkzy֐!j!j!.2lB n5. Q t=[Ќޖ!0pw-t;c!8rc"dUИ2D]IjTvY6 ,2 o-  Bu7Ie Q Qkj!Chղ2FF*CHeZݣ"ڤ!B*C1e62D32ZTI2DmcXg23D2D*2ZВ-Chmd!4 FVYeMi#C I-CԚ[F*Ch2f 3STKj!j͕!1ChZ-C Ch]u:TW!-ChZyT&UIoAeLd:DU]|3*Cv)CV ChM/2D2D-2DEЂ-ChU%!j?!!؃z`2.Bwg2Gn,W S+B-z*C.+CƿѝEЂ!V!CԜ!4p{8 Chҽ& !j!jM-CT;dmZV:CHe Q+~{2C,Sf=iOre= ѽ2=TX {*!T.F-=Qf'SUVXr1e=<{*!xO% {*ZXr2DJ^R ѽǍ{O%7e'SX2ĆTCe= |Ob{**Ct$e=Zx=<O |ObJ{*Tr9e=\e \,2=RbfSXAwAce=<T..bJ ѽ+Bx=1e'ShTO%7 ,2Dł[ |Obvp@X;R{O%7bJCJ.2D:CtHe{*񠰰|O%!Tbe=ˡ!Tr2DJncT.VSbJ2ZSiT.F!|O%WYbŔ!TH(Ct[x=\2\jbb{*yI3DJ7f=܀!xOb]S!T2=*Ct\L ѽ!T.kTP0CzsXO;?ޭ]w9޺|`ލ{ٶmqc߽{N5Ë|6UnmKwn}߷`鏯>|%훚[z ooxSVVO^?EP?T?UV=zXaêUV=zxëW^=zx#GTQ=zD#GVY=zd#GVz cCP=1Tz ccX=1VzccT=1UzLcST=1WzcZ/+^ݼP\UWЏ8I?JVRmn+u[JVffffffffff6۠n 6۠n 6۠n6ۨn6ۨn6ۤnM6ۤnM6ۤn6۬n6۬n%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%&Xbb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%.Xb%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%!XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%)XbI%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%X2%__O_|dW?y ?;~y#~3w+] }WBw;;;#;#;N;N;N;3;3;/xV ZW+j^xV ZW+j^xV ZW+j^xV ZW+j^xV ZW+j^xV ZW+j^xV ZW+j^xV ZW+j^xV ZW+j^xV ZW+j^xV ZW+j^xV ZW+j^xV ZW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^xeW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^9xW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW^xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUW ^%xUWx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5W#x5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5Wx5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3x5W3xvn ~;w+] }WBw+5555555555uuuuuuuuuu MMMMMMMMMMw@}w@}w@}GwD}GwD}GwB }'wB }'wB}gwF}gwF}+vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7vn ~o7v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;v~ow;~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=~{o=ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO ='ߞ~{oO =##/<܋po:w}{oO?T4-*rggobi/man/0000755000176000001440000000000011777243426012343 5ustar ripleyusersrggobi/man/colorscheme--b2.rd0000644000176000001440000000106211772563330015544 0ustar ripleyusers\name{"colorscheme<-"} \alias{colorscheme<-} \title{Set active colour scheme.} \author{Hadley Wickham } \description{ Specify the active color scheme in a GGobi instance or the session options. } \usage{"colorscheme<-"(x, value)} \arguments{ \item{x}{GGobi object} \item{value}{colour scheme to make active} } \value{The name of the previously active color scheme.} \details{This makes a particular color scheme active within a GGobi instance.} \examples{g <- ggobi(mtcars) colorscheme(g) <- "Set1 8" colorscheme(g) <- 1} \keyword{color} rggobi/man/glyph-size-GGobiData-3t.rd0000644000176000001440000000055411777227722017075 0ustar ripleyusers\name{glyph_size.GGobiData} \alias{glyph_size.GGobiData} \alias{glyph_size} \title{Get glyph size} \author{Hadley Wickham } \description{ Get glyph size } \usage{\S3method{glyph_size}{GGobiData}(x)} \arguments{ \item{x}{GGobiData} } \details{Glyph size is an integer between 1 and 6.} \seealso{\code{\link{glyph_size<-}}} \keyword{dynamic} rggobi/man/ggobi-find-file-fe.rd0000644000176000001440000000061111772563330016174 0ustar ripleyusers\name{ggobi_find_file} \alias{ggobi_find_file} \title{Find GGobi file.} \author{Hadley Wickham } \description{ Finds a file stored somewhere in the ggobi installation. } \usage{ggobi_find_file(..., check = F)} \arguments{ \item{...}{bits of the path to join together} \item{check}{} } \examples{ggobi_find_file("data","tips.xml")} \keyword{dynamic} \keyword{internal} rggobi/man/summary-GGobi-c4.rd0000644000176000001440000000055311777227706015666 0ustar ripleyusers\name{summary.GGobi} \alias{summary.GGobi} \title{GGobi summary} \author{Hadley Wickham } \description{ Get a description of the global state of the GGobi session. } \usage{\S3method{summary}{GGobi}(object, \dots)} \arguments{ \item{object}{ggobi object} \item{\dots}{ignored} } \examples{g <- ggobi(mtcars) summary(g)} \keyword{dynamic} rggobi/man/ncol-GGobiData-p3.rd0000644000176000001440000000044511777227666015737 0ustar ripleyusers\name{ncol.GGobiData} \alias{ncol.GGobiData} \title{GGobiData columns} \author{Hadley Wickham } \description{ Retrieve the number of columns in a GGobiData } \usage{\S3method{ncol}{GGobiData}(d)} \arguments{ \item{d}{dataset} } \keyword{attribute} \keyword{internal} rggobi/man/dataset-GGobiDisplay-gk.rd0000644000176000001440000000076611777227646017250 0ustar ripleyusers\name{dataset.GGobiDisplay} \alias{dataset.GGobiDisplay} \title{Get display dataset} \author{Hadley Wickham } \description{ Returns a link to the GGobiData (dataset) object associated with this display. } \usage{\S3method{dataset}{GGobiDisplay}(x, .gobi=ggobi(x))} \arguments{ \item{x}{GGobiDisplay object} \item{.gobi}{ggobi reference} } \details{See \code{\link{[.GGobi}} for more information on} \examples{g <- ggobi(mtcars) d <- displays(g)[[1]] dataset(d)} \keyword{manip} rggobi/man/close-GGobiDisplay-ke.rd0000644000176000001440000000066711777227631016720 0ustar ripleyusers\name{close.GGobiDisplay} \alias{close.GGobiDisplay} \title{Close display} \author{Hadley Wickham } \description{ Closes the referenced display. The R variable will be invalid after this call. } \usage{\S3method{close}{GGobiDisplay}(con, \dots)} \arguments{ \item{con}{GGobiDisplay object to close} \item{\dots}{} } \examples{g <- ggobi(mtcars) displays(g) close(displays(g)[[1]]) displays(g)} \keyword{internal} rggobi/man/excluded-GGobiData-ic.rd0000644000176000001440000000055411777227610016640 0ustar ripleyusers\name{excluded.GGobiData} \alias{excluded.GGobiData} \title{Get excluded status} \author{Hadley Wickham } \description{ Get the exclusion status of points. } \usage{\S3method{excluded}{GGobiData}(x)} \arguments{ \item{x}{ggobiDataget} } \details{If a point is excluded it is not drawn.} \seealso{\code{\link{excluded<-}}} \keyword{dynamic} rggobi/man/variables--1i.rd0000644000176000001440000000037711772563330015227 0ustar ripleyusers\name{"variables<-"} \alias{variables<-} \title{Set variables} \author{Hadley Wickham } \description{ Set variable names in a container } \usage{"variables<-"(x, value)} \arguments{ \item{x}{} \item{value}{} } \keyword{internal} rggobi/man/mapGlyphType-t9.rd0000644000176000001440000000044411772563330015643 0ustar ripleyusers\name{mapGlyphType} \alias{mapGlyphType} \title{Map glyph type.} \author{Hadley Wickham } \description{ Map glyph character code to number } \usage{mapGlyphType(types)} \arguments{ \item{types}{vector of glyph character codes} } \keyword{dynamic} \keyword{internal} rggobi/man/glyph-type---GGobiData-r1.rd0000644000176000001440000000055211777242724017227 0ustar ripleyusers\name{"glyph_type<-.GGobiData"} \alias{glyph_type<-.GGobiData} \alias{glyph_type<-} \title{Set glyph type} \author{Hadley Wickham } \description{ Set glyph type } \usage{\S3method{glyph_type}{GGobiData}(x) <- value} \arguments{ \item{x}{GGobiData} \item{value}{vector of new types} } \seealso{\code{\link{glyph_type}}} \keyword{dynamic} rggobi/man/nrow-GGobiData-om.rd0000644000176000001440000000043611777227560016053 0ustar ripleyusers\name{nrow.GGobiData} \alias{nrow.GGobiData} \title{GGobiData rows} \author{Hadley Wickham } \description{ Retrieve the number of row in a GGobiData } \usage{\S3method{nrow}{GGobiData}(d)} \arguments{ \item{d}{dataset} } \keyword{attribute} \keyword{internal} rggobi/man/ggobi-set-data-frame-vy.rd0000644000176000001440000000105211772563330017175 0ustar ripleyusers\name{ggobi_set_data_frame} \alias{ggobi_set_data_frame} \title{Set data frame.} \author{Hadley Wickham } \description{ Add data.frame to ggobi instance. } \usage{ggobi_set_data_frame(data, name = deparse(sys.call()[[2]]), description = paste("R data frame", name), id = NULL, .gobi = ggobi_get())} \arguments{ \item{data}{data frame to add} \item{name}{data set name (appears on tabs in ggobi)} \item{description}{description of data frame} \item{id}{rownames} \item{.gobi}{ggobi instance} } \keyword{manip} \keyword{internal} rggobi/man/shadowed-GGobiData-8b.rd0000644000176000001440000000070711777227550016562 0ustar ripleyusers\name{shadowed.GGobiData} \alias{shadowed.GGobiData} \alias{shadowed} \title{Get shadowed status} \author{Hadley Wickham } \description{ Get the exclusion status of points. } \usage{\S3method{shadowed}{GGobiData}(x)} \arguments{ \item{x}{ggobiDataget} } \details{If a point is shadowed it is drawn in a dark gray colour, behind all non-shadowed points. It cannot be selected.} \seealso{\code{\link{shadowed<-}}} \keyword{dynamic} rggobi/man/dimnames---GGobiData-ds.rd0000644000176000001440000000050611777227535017010 0ustar ripleyusers\name{"dimnames<-.GGobiData"} \alias{dimnames<-.GGobiData} \title{Set dim names} \author{Hadley Wickham } \description{ Set dim names for a GGobiData } \usage{\S3method{dimnames}{GGobiData}(x) <- value} \arguments{ \item{x}{GGobiData} \item{value}{new names} } \keyword{attribute} \keyword{internal} rggobi/man/connecting-edges-vf.rd0000644000176000001440000000053411772563330016513 0ustar ripleyusers\name{connecting_edges} \alias{connecting_edges} \title{Get connecting edges} \author{Hadley Wickham } \description{ Get actual edges from application of edges dataset to target dataset. } \usage{connecting_edges(x, y)} \arguments{ \item{x}{target ggobi dataset} \item{y}{ggobi dataset containing edges} } \keyword{manip} rggobi/man/display-GGobiData-vz.rd0000644000176000001440000000313011777227505016550 0ustar ripleyusers\name{display.GGobiData} \alias{display.GGobiData} \title{Create a new display} \author{Hadley Wickham } \description{ Create a new display for the GGobiData object. } \usage{\S3method{display}{GGobiData}(x, pmode="Scatterplot Display", vars=list(X=names(x)), embed=FALSE, ...)} \arguments{ \item{x}{GGobiData object} \item{pmode}{projection mode to use} \item{vars}{variables to display, see \code{\link{variables.GGobiDisplay}} for details} \item{embed}{If TRUE, returns widget for use with RGtk2} \item{...}{ignored} } \details{This function allows you to create a new display from a GGobiData object. You will need to specify the type of display you want ("Scatterplot Display", "Scatterplot Matrix" and "Parallel Coordinates Display" are the most common), and which variables the plot should be intialised with. Specifying more than two variables only makes sense for scatterplot matrices and pcps. Many of the plots used in GGobi (eg. the tours and densities plots) are special modes of the scatterplot display. You will need to create a new scatterplot display, change the projection mode to what you want, and then set the variables. Hopefully this will be improved in a future version of rggobi.} \seealso{\code{\link{ggobi_display_types}} for a list of display types} \examples{g <- ggobi(mtcars) display(g[1]) display(g[1], vars=list(X=4, Y=5)) display(g[1], vars=list(X="drat", Y="hp")) display(g[1], "Parallel Coordinates Display") \dontrun{ display(g[1], "2D Tour") display(g[1], "2x1D Tour", list(X=c(1,2,3), Y=c(4,5,6))) } display(g[1], "Scatterplot Matrix")} \keyword{dynamic} rggobi/man/variables---GGobiDisplay-a6.rd0000644000176000001440000000226111777227465017621 0ustar ripleyusers\name{"variables<-.GGobiDisplay"} \alias{variables<-.GGobiDisplay} \title{Set display variables} \author{Hadley Wickham } \description{ Set display variables with a list of x, y, and z component variable indices. } \usage{\S3method{variables}{GGobiDisplay}(x) <- value} \arguments{ \item{x}{GGobiDisplay object} \item{value}{list with X, Y and Z components listing the variable indices to display, either as numeric position or character variable name} } \details{There are three types of variables in GGobi displays: x, y, z, which correspond to the labels on the toggle buttons in GGobi. Most plots have a constrained set of possible options. For example, in tours you can only set x variables, and you must have at least three. Or in the rotation plot, you need exactly one x, y, and z variable. Currently, there is no checking done to ensure that you are sending a sensible set of variables for the given display type. Generally, any invalid choices will be silently ignored.} \examples{g <- ggobi(mtcars) d <- display(g[1], "Parallel Coordinates Display") variables(d) variables(d) <- list(X=1:8) variables(d) <- list(X=c("mpg", "cyl")) variables(d)} \keyword{dynamic} rggobi/man/colorscheme-6n.rd0000644000176000001440000000045011772563330015507 0ustar ripleyusers\name{colorscheme} \alias{colorscheme} \title{Get active colour scheme} \author{Hadley Wickham } \description{ Get name of the active colour scheme } \usage{colorscheme(x)} \arguments{ \item{x}{GGobi object} } \examples{g <- ggobi(mtcars) colorscheme(g)} \keyword{color} rggobi/man/displays-GGobi-n2.rd0000644000176000001440000000146711777227446016040 0ustar ripleyusers\name{displays.GGobi} \alias{displays.GGobi} \alias{displays.GGobi} \title{Get GGobi displays} \author{Hadley Wickham } \description{ Gets list of displays in the specified GGobi instance } \usage{\S3method{displays}{GGobi}(x)} \arguments{ \item{x}{GGobi object} } \details{A display basically corresponds to a window in GGobi. A display may contain mutliple plots within it. For example, the scatterplot matrix contains $p * p$ plots. Use this function to obtain a reference to a display (they are numbered in the order they are created) so you can change display mode, set variables (\code{\link{variables<-.GGobiDisplay}}), or save a static image to disk.} \seealso{\code{\link{display}} to create displays} \examples{g <- ggobi(mtcars) displays(g) display(g[1]) displays(g)} \keyword{dynamic} rggobi/man/ggobi-display-set-tour-projection-2n.rd0000644000176000001440000000163711772563330021674 0ustar ripleyusers\name{ggobi_display_set_tour_projection} \alias{ggobi_display_set_tour_projection} \title{Set tour projection} \author{Hadley Wickham } \description{ Set the tour projection from a GGobi tour. } \usage{ggobi_display_set_tour_projection(gd, value)} \arguments{ \item{gd}{GGobiDisplay object running tour} \item{value}{tour projection} } \details{If you know the projection you would like to see in the tour, you can use this function to set it. The example illustrates setting the projection to show the first two principle components.} \examples{g <- ggobi(mtcars) d <- displays(g)[[1]] \dontrun{ pmode(d) <- "2D Tour" variables(d) <- list(X=names(mtcars)) ggobi_display_get_tour_projection(d) pc <- princomp(as.matrix(mtcars))$loadings[,1:2] ggobi_display_set_tour_projection(d, pc) pc <- princomp(as.matrix(mtcars), cor=T)$loadings ggobi_display_set_tour_projection(d, pc)[,1:2] }} \keyword{dynamic} rggobi/man/ids-GGobiData-yu.rd0000644000176000001440000000043711777227432015666 0ustar ripleyusers\name{ids.GGobiData} \alias{ids.GGobiData} \alias{ids} \title{Row ids} \author{Hadley Wickham } \description{ Retrive row ids from a GGobiData } \usage{\S3method{ids}{GGobiData}(x)} \arguments{ \item{x}{GGobiData} } \seealso{\code{\link{ids<-}}} \keyword{manip} rggobi/man/GGobiData-class.rd0000644000176000001440000000024111777225327015553 0ustar ripleyusers\name{GGobiData-class} \title{GGobiData S4 class} \alias{GGobiData-class} \keyword{internal} \description{ This is an S4 version of the GGobiData S3 class. } rggobi/man/display-ce.rd0000644000176000001440000000034511772563330014720 0ustar ripleyusers\name{display} \alias{display} \title{Display construction} \author{Hadley Wickham } \description{ Create a new display } \usage{display(x, ...)} \arguments{ \item{x}{} \item{...}{} } \keyword{internal} rggobi/man/edges-lk.rd0000644000176000001440000000035511772563330014362 0ustar ripleyusers\name{edges} \alias{edges} \title{Get edges} \author{Hadley Wickham } \description{ Get edges for a dataset } \usage{edges(x)} \arguments{ \item{x}{ggobi dataset} } \value{A matrix of edge pairs} \keyword{manip} rggobi/man/glyph-colour-GGobiData-p2.rd0000644000176000001440000000053311777227422017413 0ustar ripleyusers\name{glyph_colour.GGobiData} \alias{glyph_colour.GGobiData} \alias{glyph_colour} \alias{glyph_color} \title{Get glyph colour} \author{Hadley Wickham } \description{ Get glyph colour } \usage{\S3method{glyph_colour}{GGobiData}(x)} \arguments{ \item{x}{GGobiData} } \seealso{\code{\link{glyph_colour<-}}} \keyword{dynamic} rggobi/man/ggobi-data-add-variable-xu.rd0000644000176000001440000000057311772563330017632 0ustar ripleyusers\name{ggobi_data_add_variable} \alias{ggobi_data_add_variable} \alias{addVariable} \title{Add variable} \author{Hadley Wickham } \description{ Add variable to a GGobiData } \usage{ggobi_data_add_variable(x, vals, name, ...)} \arguments{ \item{x}{GGobiData} \item{vals}{values to add} \item{name}{name of column to add} \item{...}{} } \keyword{internal} rggobi/man/dataset-numeric-gd.rd0000644000176000001440000000142511777243376016355 0ustar ripleyusers\name{dataset.numeric} \alias{dataset.numeric} \alias{dataset.character} \title{Get ggobi dataset.} \author{Hadley Wickham } \description{ Get an object representing an internal ggobi dataset } \usage{\S3method{dataset}{numeric}(x, .gobi = ggobi_get())} \arguments{ \item{x}{which dataset to retrieve, an integer for positional matching or a character to match by name} \item{.gobi}{GGobi instance} } \value{A list of \code{GGobiData} objects} \details{It is convenient to be able to refer to and operate on a ggobi dataset as if it were a regular R dataset. This function allows one to get an \code{GGobiData} object that represents a particular dataset.} \seealso{\code{\link{$.GGobiData}} for user level selection of datasets} \keyword{manip} \keyword{internal} rggobi/man/glyph-size---GGobiData-9w.rd0000644000176000001440000000063511777227405017236 0ustar ripleyusers\name{"glyph_size<-.GGobiData"} \alias{glyph_size<-.GGobiData} \alias{glyph_size<-} \title{Set glyph size} \author{Hadley Wickham } \description{ Set glyph size } \usage{\S3method{glyph_size}{GGobiData}(x) <- value} \arguments{ \item{x}{GGobiData} \item{value}{vector of new sizes} } \details{Glyph size is an integer between 1 and 6.} \seealso{\code{\link{glyph_size}}} \keyword{dynamic} rggobi/man/variables-GGobiDisplay-si.rd0000644000176000001440000000144111777227356017572 0ustar ripleyusers\name{variables.GGobiDisplay} \alias{variables.GGobiDisplay} \title{Get display variables} \author{Hadley Wickham } \description{ List the variables used in a given display } \usage{\S3method{variables}{GGobiDisplay}(x)} \arguments{ \item{x}{GGobiDisplay object} } \details{There are three types of variables in GGobi displays: X, Y, Z, which correspond to the labels on the toggle buttons in GGobi. Most plots have a constrained set of possible options. For example, in tours you can only set X variables, and you must have at least three. Or in the rotation plot, you need exactly one X, Y, and Z variable. You can figure out what these conditions are by using the toggle buttons in GGobi.} \seealso{\code{\link{variables<-.GGobiDisplay}} for examples} \keyword{dynamic} rggobi/man/glyph-type-GGobiData-og.rd0000644000176000001440000000102311777227343017152 0ustar ripleyusers\name{glyph_type.GGobiData} \alias{glyph_type.GGobiData} \alias{glyph_type} \title{Get glyph type.} \author{Hadley Wickham } \description{ Get glyph type. } \usage{\S3method{glyph_type}{GGobiData}(x)} \arguments{ \item{x}{GGobiData} } \details{Glyph type refers to the shape of the glyph, one of: \itemize{ \item a filled circle \item an empty circle \item a filled square \item an empty square \item a single pixel \item a plus sign \item a cross }} \seealso{\code{\link{glyph_type<-}}} \keyword{dynamic} rggobi/man/ggobi-symbol-ec.rd0000644000176000001440000000100011772563330015632 0ustar ripleyusers\name{.ggobi.symbol} \alias{.ggobi.symbol} \title{GGobi symbol creation} \author{Hadley Wickham } \description{ Maps the given name to the name of the corresponding C routine } \usage{.ggobi.symbol(name)} \arguments{ \item{name}{} } \value{the name of the C routine corresponding to its argument} \details{A simple way of generating the prefix for a symbol used in this package/library so that we can hide it from other packages and avoid conflicts.} \keyword{dynamic} \keyword{internal} rggobi/man/ggobi-display-make-type-3r.rd0000644000176000001440000000051011772563330017626 0ustar ripleyusers\name{ggobi_display_make_type} \alias{ggobi_display_make_type} \title{Convert plot name to GGobi plot type} \author{Hadley Wickham } \description{ Used to convert between friendly plot name and internal GGobi name. } \usage{ggobi_display_make_type(type)} \arguments{ \item{type}{} } \keyword{internal} rggobi/man/ggobi-data-remove-variable-bv.rd0000644000176000001440000000045511772563330020351 0ustar ripleyusers\name{ggobi_data_remove_variable} \alias{ggobi_data_remove_variable} \title{Remove variable} \author{Hadley Wickham } \description{ Remove variables from a GGobiData object } \usage{ggobi_data_remove_variable(x, var)} \arguments{ \item{x}{} \item{var}{} } \keyword{internal} rggobi/man/get--GGobi-7p.rd0000644000176000001440000000130611777227322015034 0ustar ripleyusers\name{"[.GGobi"} \alias{[.GGobi} \alias{[[.GGobi} \alias{$.GGobi} \title{Get ggobi data.} \author{Hadley Wickham } \description{ Conveniently retrieve ggobi dataset. } \usage{\S3method{[}{GGobi}(x, i, ..., drop=TRUE)} \arguments{ \item{x}{GGobi object} \item{i}{name of dataset to retrive} \item{...}{ignored} \item{drop}{if TRUE, return vector is possible} } \details{It is convenient to be able to refer to and operate on a ggobi dataset as if it were a regular R dataset. This function allows one to get an \code{GGobiData} object that represents a particular dataset.} \examples{g <- ggobi(ChickWeight) g["cars"] <- mtcars g[1:2] g["ChickWeight"] g["cars"] g$cars} \keyword{manip} rggobi/man/ggobi-display-types-9g.rd0000644000176000001440000000053711772563330017102 0ustar ripleyusers\name{ggobi_display_types} \alias{ggobi_display_types} \title{GGobiDisplay types} \author{Hadley Wickham } \description{ Get list of GGobiDisplay types. An instance of GGobi must be open } \usage{ggobi_display_types()} \arguments{ \item{}{GGobi reference} } \seealso{\code{\link{ggobi_display_make_type}}} \keyword{internal} rggobi/man/dimnames-GGobiData-x0.rd0000644000176000001440000000046311777227306016575 0ustar ripleyusers\name{dimnames.GGobiData} \alias{dimnames.GGobiData} \title{Get dimension names} \author{Hadley Wickham } \description{ Get row and column names for a GGobiData } \usage{\S3method{dimnames}{GGobiData}(x)} \arguments{ \item{x}{ggobiDataget} } \keyword{attribute} \keyword{internal} rggobi/man/dim-GGobiData-ok.rd0000644000176000001440000000050411777227275015634 0ustar ripleyusers\name{dim.GGobiData} \alias{dim.GGobiData} \title{GGobiData dimensions} \author{Hadley Wickham } \description{ Retrieve the dimension of a GGobiData } \usage{\S3method{dim}{GGobiData}(x)} \arguments{ \item{x}{dataset} } \examples{g <- ggobi(mtcars) dim(g[1])} \keyword{attribute} \keyword{internal} rggobi/man/length-GGobiDisplay-gt.rd0000644000176000001440000000055111777227265017102 0ustar ripleyusers\name{length.GGobiDisplay} \alias{length.GGobiDisplay} \title{Length method for GGobiDisplay} \author{Hadley Wickham } \description{ Returns the number of plots within a given display } \usage{\S3method{length}{GGobiDisplay}(x)} \arguments{ \item{x}{GGobiDisplay object from which to retrieve the number of plots} } \keyword{internal} rggobi/man/names---GGobiData-p2.rd0000644000176000001440000000050311777227252016222 0ustar ripleyusers\name{"names<-.GGobiData"} \alias{names<-.GGobiData} \title{Set column names} \author{Hadley Wickham } \description{ Set column names for a GGobiData } \usage{\S3method{names}{GGobiData}(x) <- value} \arguments{ \item{x}{GGobiData} \item{value}{new names} } \keyword{attribute} \keyword{internal} rggobi/man/get--GGobiData-9v.rd0000644000176000001440000000130611777227762015646 0ustar ripleyusers\name{"[.GGobiData"} \alias{[.GGobiData} \alias{[[.GGobiData} \alias{$.GGobiData} \title{Subsettting} \author{Hadley Wickham } \description{ Subsetting for ggobi datasets } \usage{\S3method{[}{GGobiData}(x, i, j, drop=FALSE)} \arguments{ \item{x}{ggobi dataset} \item{i}{rows} \item{j}{cols} \item{drop}{drop dimensions?} } \value{desired subset from data.frame} \details{This functions allow one to treat a ggobi dataset as if it were a local data.frame. One can extract and assign elements within the dataset. This method works by retrieving the entire dataset into R, and then subsetting with R.} \examples{g <- ggobi(mtcars) x <- g$mtcars x[1:5, 1:5] x[[1]] x$cyl} \keyword{manip} rggobi/man/names-GGobiData-c0.rd0000644000176000001440000000046611777227176016066 0ustar ripleyusers\name{names.GGobiData} \alias{names.GGobiData} \title{GGobiData column names} \author{Hadley Wickham } \description{ Get column names for a GGobiData } \usage{\S3method{names}{GGobiData}(x, \dots)} \arguments{ \item{x}{dataset} \item{\dots}{} } \keyword{attribute} \keyword{internal} rggobi/man/glyph-colour---GGobiData-u7.rd0000644000176000001440000000062011777227154017556 0ustar ripleyusers\name{"glyph_colour<-.GGobiData"} \alias{glyph_colour<-.GGobiData} \alias{glyph_colour<-} \alias{glyph_color<-} \title{Set glyph colour} \author{Hadley Wickham } \description{ Set glyph colour } \usage{\S3method{glyph_colour}{GGobiData}(x) <- value} \arguments{ \item{x}{GGobiData} \item{value}{vector of new colours} } \seealso{\code{\link{glyph_colour}}} \keyword{dynamic} rggobi/man/ggobi-display-save-picture-bw.rd0000644000176000001440000000172211772563330020433 0ustar ripleyusers\name{ggobi_display_save_picture} \alias{ggobi_display_save_picture} \title{Save picture of plot (and window) to disk} \author{Hadley Wickham } \description{ This allows you to make a static copy of a GGobiDisplay. } \usage{ggobi_display_save_picture(display=displays(ggobi_get())[[1]], path="ggobi_display.png", filetype="png", plot.only = FALSE)} \arguments{ \item{display}{GGobiDisplay to save} \item{path}{path to save to} \item{filetype}{type of file to save} \item{plot.only}{if TRUE, save only plot, otherwise save surrounding GUI elements as well} } \details{If you want to make publicaiton quality graphics, you should probably use the DescribeDisplay plugin and package. This will recreate a GGobiDisplay in R, and so can produce high-quality vector (eg. pdf) output. See \url{http://www.ggobi.org/describe-display} for more information} \examples{g <- ggobi(mtcars) ggobi_display_save_picture(displays(g)[[1]], "test.png")} \keyword{hplot} rggobi/man/ggobi-gtk-main-window-l6.rd0000644000176000001440000000057711772563330017315 0ustar ripleyusers\name{ggobi_gtk_main_window} \alias{ggobi_gtk_main_window} \title{Gtk main window} \author{Hadley Wickham } \description{ Retrieve RGtk object for main window } \usage{ggobi_gtk_main_window(.gobi = ggobi_get())} \arguments{ \item{.gobi}{} } \details{Useful for embedding in other applications or for listening to their signals via RGtk2.} \keyword{internal} rggobi/man/print-GGobiData-ja.rd0000644000176000001440000000062411777227105016173 0ustar ripleyusers\name{print.GGobiData} \alias{print.GGobiData} \title{Print GGobiData} \author{Hadley Wickham } \description{ Print GGobiData } \usage{\S3method{print}{GGobiData}(x, \dots)} \arguments{ \item{x}{GGobi dataset to retrieve} \item{\dots}{} } \details{By default printing a GGobiData acts like printing an R data.frame - ie. show all the data} \keyword{attribute} \keyword{internal} rggobi/man/ggobi-default-20.rd0000644000176000001440000000414411777243426015625 0ustar ripleyusers\name{ggobi.default} \alias{ggobi.default} \alias{rggobi} \alias{ggobi} \title{New ggobi} \author{Hadley Wickham } \description{ Creates a new ggobi instance } \usage{\S3method{ggobi}{default}(data, args=character(0), mode=character(0), name = deparse(sys.call()[[2]]), ...)} \arguments{ \item{data}{the name of a file containing the data, or a data frame or matrix containing the values} \item{args}{a character vector of command-line arguments} \item{mode}{data format GGobi should expect to read the data from, if reading from a file.} \item{name}{the name to use in GGobi for the dataset, if one is specified} \item{...}{ignored} } \value{A ggobi object} \details{This function creates a new instance of GGobi with or without new data. Use this function whenever you want to create a new GGobi indepdent of the others---they will not share linked plots. If you want to add another dataset to an existing ggobi, please see \code{\link{[<-.GGobi}} There are currently three basic types of functions that you can use with rggobi: \itemize{ \item Data getting and setting: see \code{\link{[.GGobi}}, and \code{\link{[.GGobiData}} \item "Automatic" brushing: see \code{\link{glyph_colour}}, \code{\link{glyph_size}}, \code{\link{glyph_type}}, \code{\link{shadowed}}, \code{\link{excluded}}, and the associated setter functions. \item Edge modifcation: see \code{\link{edges}}, \code{\link{edges<-}}, \code{\link{ggobi_longitudinal}} } You will generally spend most of your time working with \code{ggobdata}s, you retrieve using \code{\link{$.GGobiData}}, \code{\link{[.GGobiData}}, or \code{\link{[[.GGobiData}}. Most of the time these will operate like normal R datasets while pointing to the data in GGobi so that all changes are kept in sync. If you need to force a ggobiDaataset to be an R \code{data.frame} use \code{\link{as.data.frame}}.} \examples{ggobi(ggobi_find_file("data", "flea.csv")) ggobi(ggobi_find_file("data", "flea.xml")) ggobi(mtcars) mtcarsg <- ggobi_get()$mtcars glyph_colour(mtcarsg) glyph_colour(mtcarsg) <- ifelse(mtcarsg$cyl < 4, 1, 2) glyph_size(mtcarsg) <- mtcarsg$cyl} \keyword{dynamic} rggobi/man/ggobi-GGobiDisplay-zh.rd0000644000176000001440000000052711777227040016711 0ustar ripleyusers\name{ggobi.GGobiDisplay} \alias{ggobi.GGobiDisplay} \title{Get display GGobi} \author{Hadley Wickham } \description{ Returns a link to the GGobi object associated with this display } \usage{\S3method{ggobi}{GGobiDisplay}(data, \dots)} \arguments{ \item{data}{GGobiDisplay object} \item{\dots}{} } \keyword{internal} rggobi/man/valid-ggobi-uv.rd0000644000176000001440000000172511772563330015505 0ustar ripleyusers\name{valid_ggobi} \alias{valid_ggobi} \title{Validity checking} \author{Hadley Wickham } \description{ Determines whether a reference to an internal ggobi object is valid } \usage{valid_ggobi(.gobi)} \arguments{ \item{.gobi}{an object of class \code{ggobi} which refers to an internal ggobi instance.} } \value{\code{TRUE} if real object still exist, \code{FALSE} otherwise} \details{One can create multiple, independent ggobi instances within a single R session and one can also remove them either programmatically or via the GUI. To be able to refer to these objects which are actually C-level internal objects, one has a reference or handle from an S object. Since the C level object can be destroyed while the S object still refers to them, this function allows one to check whether the internal object to which R refers is still in existence.} \examples{g <- ggobi(mtcars) valid_ggobi(g) close(g) valid_ggobi(g) } \keyword{dynamic} \keyword{internal} rggobi/man/GGobiCall-n1.rd0000644000176000001440000000263711772563330014773 0ustar ripleyusers\name{.GGobiCall} \alias{.GGobiCall} \alias{.GGobiC} \title{Calling native routines} \author{Hadley Wickham } \description{ Wrappers for calling C routines in the R-ggobi library. } \usage{.GGobiCall(.name, ..., .gobi = ggobi_get(), .test=TRUE)} \arguments{ \item{.name}{the simple name of the C routine to be resolved} \item{...}{the arguments that to be passed to the \code{\link{.C}} or \code{\link{.Call}}} \item{.gobi}{the ggobi instance identifier that is to be passed to the C routine as its last argument} \item{.test}{} } \value{the same result as the corresponding \code{.C} and \code{.Call}} \details{\code{.GGobiC} and \code{.GGobiCall} convert the name and then call their C invocation counterparts. These functions map the simple name of a C routine into the package-specific version of that name. These allow use to hide the use a name \emph{mangling} scheme of our choosing for the C level routines in the shared library/DLL that provides the glue between R and ggobi. This is useful for avoiding name conflicts with other C code in R or other packages. These are only of relevance to the developers of this package and those working with its C code. The mapping of the name to its corresponding C routine name is done in conjunction with the pre-processor macro \code{RS_GGOBI}. These must be synchronized.} \seealso{\code{\link{.C}}, \code{\link{.Call}}} \keyword{dynamic} \keyword{internal} rggobi/man/shadowed---GGobiData-h7.rd0000644000176000001440000000076011777227006016714 0ustar ripleyusers\name{"shadowed<-.GGobiData"} \alias{shadowed<-.GGobiData} \alias{shadowed<-} \title{Set shadowed status} \author{Hadley Wickham } \description{ Set the exclusion status of points. } \usage{\S3method{shadowed}{GGobiData}(x) <- value} \arguments{ \item{x}{GGobiData} \item{value}{logical vector} } \details{If a point is shadowed it is drawn in a dark gray colour, behind all non-shadowed points. It cannot be selected.} \seealso{\code{\link{shadowed}}} \keyword{dynamic} rggobi/man/pmodes-tc.rd0000644000176000001440000000117611772563330014564 0ustar ripleyusers\name{pmodes} \alias{pmodes} \alias{imodes} \alias{pmodes.default} \alias{pmodes.GGobiDisplay} \alias{imodes.GGobiDisplay} \alias{pmodes.character} \alias{imodes.character} \title{List available projection/interaction modes} \author{Hadley Wickham } \description{ These generic methods retrieves possible projection/interaction modes. } \usage{pmodes(x=NULL)} \arguments{ \item{x}{} } \details{The default methods retrieve a list modes for all display types, the character methods retrieve modes for a given display type, and the GGobiDisplay methods return possible modes for a given display} \keyword{internal} rggobi/man/ggobi-check-structs-qq.rd0000644000176000001440000000224311772563330017153 0ustar ripleyusers\name{ggobi_check_structs} \alias{ggobi_check_structs} \title{Check structs} \author{Hadley Wickham } \description{ Validates GGobi and Rggobi views of internal data structures } \usage{ggobi_check_structs()} \value{TRUE if the sizes in the two libraries are the same, otherwise a named logical vector indicating which structures are different} \details{This function is called when the Rggobi library is loaded and it verifies that the sizes of the different internal data structures for GGobi are the same for both the GGobi shared library/DLL and the Rggobi package. This is important as the two shared libraries are compiled separately and may have different compilation flags, etc. that make them incompatible. This function simply compares the sizes of the two views of the structures and raises a warning if they do not agree. Essentially, you should never notice this function. A warning implies that you need to re-install Rggobi against the version of GGobi you are using. @value TRUE if the sizes in the two libraries are the same, otherwise a named logical vector indicating which structures are different} \keyword{programming} \keyword{internal} rggobi/man/as-RGtkObject-8g.rd0000644000176000001440000000035111772563330015576 0ustar ripleyusers\name{as.RGtkObject} \alias{as.RGtkObject} \title{RGtk casting} \author{Hadley Wickham } \description{ Cast an object to an RGtk object } \usage{as.RGtkObject(x)} \arguments{ \item{x}{} } \keyword{internal} rggobi/man/imode-8g.rd0000644000176000001440000000136411772563330014301 0ustar ripleyusers\name{imode} \alias{imode} \alias{imode<-} \title{Interaction mode} \author{Hadley Wickham } \description{ Functions to get and set interaction mode } \usage{imode(x)} \arguments{ \item{x}{GGobiDisplay object} } \details{In GGobi, the interaction mode determines the how you interact with a plot: brushing, identify etc. Each projection mode also has a default interaction mode that allows you to select variables and control other parameters of the display You can see the list of available interaction modes using the \code{\link{imodes}} function. This accepts either a GGobiDisplay, or the name of the display type.} \examples{g <- ggobi(mtcars) d <- displays(g)[[1]] imode(d) imodes(d) imode(d) <- "Brush"} \keyword{dynamic} rggobi/man/dataset-mn.rd0000644000176000001440000000040211772563330014715 0ustar ripleyusers\name{dataset} \alias{dataset} \title{Generic method for getting dataset} \author{Hadley Wickham } \description{ @keyword internal } \usage{dataset(x, .gobi = ggobi_get())} \arguments{ \item{x}{} \item{.gobi}{} } \keyword{internal} rggobi/man/summary-GGobiData-mm.rd0000644000176000001440000000053111777226437016557 0ustar ripleyusers\name{summary.GGobiData} \alias{summary.GGobiData} \title{Summarise GGobiData.} \author{Hadley Wickham } \description{ Summarise a GGobiData with dimensions, mode and variable names. } \usage{\S3method{summary}{GGobiData}(object, \dots)} \arguments{ \item{object}{GGobiData} \item{\dots}{ignored} } \keyword{attribute} rggobi/man/ggobi-display-get-tour-projection-p0.rd0000644000176000001440000000151011772563330021646 0ustar ripleyusers\name{ggobi_display_get_tour_projection} \alias{ggobi_display_get_tour_projection} \title{Get tour projection} \author{Hadley Wickham } \description{ Get the tour projection from a GGobi tour. } \usage{ggobi_display_get_tour_projection(gd)} \arguments{ \item{gd}{GGobiDisplay object running tour} } \details{This function retrieves the current projection matrix from a paused tour. (The tour must be paused so that R can run commands). This can be used to record interesting projections of your data for later analysis.} \examples{g <- ggobi(mtcars) d <- displays(g)[[1]] \dontrun{ pmode(d) <- "2D Tour" ggobi_display_get_tour_projection(d) variables(d) <- list(X=names(mtcars)) ggobi_display_get_tour_projection(d) MASS::eqscplot(as.matrix(mtcars) \%*\% ggobi_display_get_tour_projection(d)) }} \keyword{dynamic} rggobi/man/edges--p8.rd0000644000176000001440000000037211772563330014357 0ustar ripleyusers\name{"edges<-"} \alias{edges<-} \title{Set edges} \author{Hadley Wickham } \description{ Generic method, see methods for more details } \usage{"edges<-"(x, value)} \arguments{ \item{x}{} \item{value}{} } \keyword{internal} rggobi/man/selected-GGobiData-xv.rd0000644000176000001440000000053711777226416016701 0ustar ripleyusers\name{selected.GGobiData} \alias{selected.GGobiData} \alias{selected} \title{Get selection status} \author{Hadley Wickham } \description{ Returns logical vector indicating if each point is under the brush } \usage{\S3method{selected}{GGobiData}(x)} \arguments{ \item{x}{GGobiData} \item{}{logical vector} } \keyword{dynamic} rggobi/man/excluded-ec.rd0000644000176000001440000000040011772563330015040 0ustar ripleyusers\name{excluded} \alias{excluded} \alias{excluded<-} \title{Get and set exclusion} \author{Hadley Wickham } \description{ Get and set the exclusion status of points } \usage{excluded(x)} \arguments{ \item{x}{} } \keyword{internal} rggobi/man/edges---GGobiDisplay-1y.rd0000644000176000001440000000062611777226403016755 0ustar ripleyusers\name{"edges<-.GGobiDisplay"} \alias{edges<-.GGobiDisplay} \title{Set edges} \author{Hadley Wickham } \description{ Set edges for a display } \usage{\S3method{edges}{GGobiDisplay}(x) <- value} \arguments{ \item{x}{GGobiDisplay object} \item{value}{GGobiData object that contains edges} } \details{This sets the dataset that a GGobiDisplay uses to display edges.} \keyword{dynamic} rggobi/man/pmode-ix.rd0000644000176000001440000000117611772563330014413 0ustar ripleyusers\name{pmode} \alias{pmode} \alias{pmode<-} \title{Projection mode} \author{Hadley Wickham } \description{ Functions to get and set projection mode } \usage{pmode(x)} \arguments{ \item{x}{GGobiDisplay object} } \details{In GGobi, the projection mode determines the type of plot that is displayed. For example, a 1D ASH plot, or a 2D tour. You can see the list of available projection modes using the \code{\link{pmodes}} function. This accepts either a GGobiDisplay, or the name of the display type.} \examples{g <- ggobi(mtcars) d <- displays(g)[[1]] pmode(d) pmodes(d) pmode(d) <- "1D Plot"} \keyword{dynamic} rggobi/man/clean-ggobi-bw.rd0000644000176000001440000000052011772563330015436 0ustar ripleyusers\name{clean.ggobi} \alias{clean.ggobi} \title{Clean ggobi} \author{Hadley Wickham } \description{ Clean arguments for ggobi } \usage{clean.ggobi(x)} \arguments{ \item{x}{vector} } \details{Arguments for ggobi need to be in specific format. This function helps ensure that.} \keyword{dynamic} \keyword{internal} rggobi/man/ggobi-longitudinal-2e.rd0000644000176000001440000000204111772563330016743 0ustar ripleyusers\name{ggobi_longitudinal} \alias{ggobi_longitudinal} \title{Create longitudinal dataset.} \author{Hadley Wickham } \description{ Instantiate new ggobi with a longitudinal data set. } \usage{ggobi_longitudinal(data, time=1:rows, id=rep(1, rows), g = NULL)} \arguments{ \item{data}{data frame} \item{time}{time variable} \item{id}{id variable} \item{g}{ggobi instance, if you don't want to create a new one} } \details{This function allows you to load longitudinal data in to GGobi and display it as a line plot. This is achieved by creating edges between adjacent time points, for a given id variable. For best viewing, we recommend that you turn the show points off in the options menu. When brushing, you may also want to use categorical brushing on the id variable, so that the entire series is selected for an observation.} \examples{data(Oxboys, package="nlme") ggobi_longitudinal(Oxboys, Occasion, Subject) ggobi_longitudinal(stormtracks, seasday, id) ggobi_longitudinal(data.frame(x=1:100, y=sin(1:100)))} \keyword{dynamic} rggobi/man/set--GGobiData-56.rd0000644000176000001440000000134511777226361015553 0ustar ripleyusers\name{"[<-.GGobiData"} \alias{[<-.GGobiData} \alias{$<-.GGobiData} \alias{[[<-.GGobiData} \title{Assignments for ggobi datasets} \author{Hadley Wickham } \description{ This functions allow one to treat a ggobi dataset as if it were a local data.frame. One can extract and assign elements within the dataset. } \usage{\S3method{[}{GGobiData}(x, i, j) <- value} \arguments{ \item{x}{ggobi dataset} \item{i}{row indices} \item{j}{column indices} \item{value}{new values} } \details{This method works by retrieving the entire dataset into R, subsetting that copy, and then returning any changes.} \examples{g <- ggobi(mtcars) x <- g["mtcars"] x[1:5, 1:5] x[1:5, 1] <- 1:5 x[1:5, 1:5]} \keyword{manip} \keyword{internal} rggobi/man/set--GGobi-b7.rd0000644000176000001440000000102511777226316015032 0ustar ripleyusers\name{"[<-.GGobi"} \alias{[<-.GGobi} \alias{$<-.GGobi} \alias{[[<-.GGobi} \title{[<-.GGobi} \author{Hadley Wickham } \description{ Add data to ggobi instance. } \usage{\S3method{[}{GGobi}(x, i) <- value} \arguments{ \item{x}{ggobi instance} \item{i}{name of data frame} \item{value}{data.frame, or string to path of file to load} } \details{This function allows you to add (and eventually) replace GGobiData objects in a GGobi instance.} \examples{g <- ggobi() g["a"] <- mtcars g$b <- mtcars} \keyword{manip} rggobi/man/check-versions-xs.rd0000644000176000001440000000036611772563330016244 0ustar ripleyusers\name{.check_versions} \alias{.check_versions} \title{check that rggobi and GGobi by major.minor versions are the same} \author{Hadley Wickham } \description{ to ensure binary compatibility } \usage{.check_versions()} rggobi/man/print-GGobiDisplay-o0.rd0000644000176000001440000000052011777226272016652 0ustar ripleyusers\name{print.GGobiDisplay} \alias{print.GGobiDisplay} \title{Print method for GGobiDisplay} \author{Hadley Wickham } \description{ Shows display type (first element in class vector) } \usage{\S3method{print}{GGobiDisplay}(x, \dots)} \arguments{ \item{x}{GGobiDisplay object} \item{\dots}{} } \keyword{internal} rggobi/man/variables-2n.rd0000644000176000001440000000034111772563330015147 0ustar ripleyusers\name{variables} \alias{variables} \title{Get variables} \author{Hadley Wickham } \description{ Get variable names from a container } \usage{variables(x)} \arguments{ \item{x}{} } \keyword{internal} rggobi/man/ggobi-data-set-variable-43.rd0000644000176000001440000000063111772563330017462 0ustar ripleyusers\name{ggobi_data_set_variable} \alias{ggobi_data_set_variable} \title{Set variable values} \author{Hadley Wickham } \description{ Set the variable values for a column in a GGobiData } \usage{ggobi_data_set_variable(x, vals, var, update = TRUE)} \arguments{ \item{x}{GGobiData} \item{vals}{values of new variable} \item{var}{variable name} \item{update}{update?} } \keyword{internal} rggobi/man/print-GGobi-yo.rd0000644000176000001440000000052111777226246015437 0ustar ripleyusers\name{print.GGobi} \alias{print.GGobi} \title{Print ggobi} \author{Hadley Wickham } \description{ Prints summary of ggobi object by instance } \usage{\S3method{print}{GGobi}(x, \dots)} \arguments{ \item{x}{ggobi object} \item{\dots}{} } \seealso{\code{\link{summary.GGobi}}} \keyword{dynamic} \keyword{internal} rggobi/man/displays-kj.rd0000644000176000001440000000032211772563330015113 0ustar ripleyusers\name{displays} \alias{displays} \title{View displays} \author{Hadley Wickham } \description{ See methods for details } \usage{displays(x)} \arguments{ \item{x}{} } \keyword{internal} rggobi/man/rownames---GGobiData-rg.rd0000644000176000001440000000065611777226223017047 0ustar ripleyusers\name{"rownames<-.GGobiData"} \alias{rownames<-.GGobiData} \title{Set row names} \author{Hadley Wickham } \description{ Set row names for a GGobiData } \usage{\S3method{rownames}{GGobiData}(x) <- value} \arguments{ \item{x}{GGobiData} \item{value}{new names} } \examples{g <- ggobi(mtcars) df <- g[1] rownames(df) rownames(df) <- tolower(rownames(df)) rownames(df)} \keyword{attribute} \keyword{internal} rggobi/man/as-data-frame-GGobiData-i6.rd0000644000176000001440000000057511777226173017376 0ustar ripleyusers\name{"as.data.frame.GGobiData"} \alias{as.data.frame.GGobiData} \alias{as.matrix.GGobiData} \title{Conversion methods} \author{Hadley Wickham } \description{ Convert a GGobiData to a regular R data.frame or matrix } \usage{\S3method{as.data.frame}{GGobiData}(x, \dots)} \arguments{ \item{x}{GGobiData} \item{\dots}{} } \keyword{manip} \keyword{internal} rggobi/man/ggobi-set-data-file-be.rd0000644000176000001440000000064311772563330016757 0ustar ripleyusers\name{ggobi_set_data_file} \alias{ggobi_set_data_file} \title{Set data file.} \author{Hadley Wickham } \description{ Open data file and add to ggobi datasets. } \usage{ggobi_set_data_file(file, mode = "unknown", add = TRUE, .gobi = ggobi_get())} \arguments{ \item{file}{path to file} \item{mode}{mode of file} \item{add}{add?} \item{.gobi}{ggobi instance} } \keyword{manip} \keyword{internal} rggobi/man/variable-index-h9.rd0000644000176000001440000000047511772563330016102 0ustar ripleyusers\name{variable_index} \alias{variable_index} \title{Variable index} \author{Hadley Wickham } \description{ Return indices corresponding to variable names } \usage{variable_index(x, names)} \arguments{ \item{x}{GGobiData} \item{names}{variable names} } \keyword{attribute} \keyword{internal} rggobi/man/ggobi-version-ao.rd0000644000176000001440000000116411772563330016035 0ustar ripleyusers\name{ggobi_version} \alias{ggobi_version} \title{Get version} \author{Hadley Wickham } \description{ GGobi version information } \usage{ggobi_version()} \value{ \item{date}{the release date of the ggobi library} \item{version}{a vector of 3 integers containing the major, minor and patch-level numbers.} \item{versionstring}{a string version of the major, minor and patch-level numbers,} } \details{Return an object that describes the version of the ggobi library being used. This allows code to execute conditionally on certain version numbers, etc.} \examples{ggobi_version()} \keyword{dynamic} rggobi/man/stormtracks.rd0000644000176000001440000000430211772563330015237 0ustar ripleyusers\name{Storm tracks data} \docType{data} \alias{stormtracks} \title{Storm tracks in the Caribbean} \description{ The data consist of tropical cyclone tracks through the Atlantic Ocean, Caribbean Sea and Gulf of Mexico from 1995 to 2005. Only ``named'' storms, those which reached tropical storm status or stronger, are included. The data originated from the National Hurricane Center's archive of Tropical Cyclone Reports ( \url{http://www.nhc.noaa.gov/pastall.shtml}). From the NHC, the reports "contain comprehensive information on each tropical cyclone, including synoptic history, meteorological statistics, casualties and damages, and the post-analysis best track (six-hourly positions and intensities)." This dataset is taken from the post-analysis best track information, which are presented in tabular form in the Tropical Cyclone Reports and came in a variety of electronic formats (PDF, HTML and Microsoft Word documents). The best track tables were then copied to text files and parsed into the comma-separated format in which they currently reside. The variables are as follows: \itemize{ \item Name: Storm Name \item Year: Year of report \item Month: Month of report \item Day: Day of report (day of the month) \item Hour: Hour of report (0, 6, 12 or 18 in UTC time) \item Latitude: Latitude of the storm's center (degrees North) \item Longitude: Longitude of the storm's center (degrees West) \item Pressure: Air pressure at the storm's center (millibars) \item Wind: Storm's maximum sustained wind speed (knots or nautical miles per hour) \item Type: Storm classification (Tropical Depression, Tropical Storm, Hurricane, \item Extratropical) \item SeasDay: Day of the hurricane season (days since June 1) } The Tropical Cyclone Reports had a variety of storm type designations and there appeared to be no consistent naming convention for cyclones that were not hurricanes, tropical depressions, or tropical storms. Many of these designations have been combined into the "Extratropical" category in this dataset. This data was put together by Jon Hobbs, a PhD student at Iowa State. Thanks Jon! } \usage{data(stormtracks)} \format{A data frame with 5519 rows and 24 variables} \keyword{datasets} rggobi/man/names-GGobi-pt.rd0000644000176000001440000000042211777226152015376 0ustar ripleyusers\name{names.GGobi} \alias{names.GGobi} \title{GGobi names} \author{Hadley Wickham } \description{ Get dataset names } \usage{\S3method{names}{GGobi}(x)} \arguments{ \item{x}{ggobi instance} } \examples{g <- ggobi(mtcars) names(g)} \keyword{dynamic} rggobi/man/excluded---GGobiData-3z.rd0000644000176000001440000000062311777226124016727 0ustar ripleyusers\name{"excluded<-.GGobiData"} \alias{excluded<-.GGobiData} \title{Set excluded status} \author{Hadley Wickham } \description{ Set the exclusion status of points. } \usage{\S3method{excluded}{GGobiData}(x) <- value} \arguments{ \item{x}{GGobiData} \item{value}{logical vector} } \details{If a point is excluded it is not drawn.} \seealso{\code{\link{excluded}}} \keyword{dynamic} rggobi/man/ggobi-count-u4.rd0000644000176000001440000000123111772563330015424 0ustar ripleyusers\name{ggobi_count} \alias{ggobi_count} \title{Get number of GGobis} \author{Hadley Wickham } \description{ Retrieves the number of ggobi instances within this session } \usage{ggobi_count()} \details{One or more ggobi instances can be created within an R session so that one can simultaneously look at different datasets or have different views of the same dataset. This function returns the number of ggobis in existence. The different ggobi instances are maintained as C level structures. This function accesses a variable that stores how many are in existence when the function is invoked.} \examples{ggobi_count()} \keyword{dynamic} rggobi/man/ids---GGobiData-mw.rd0000644000176000001440000000050711777226072016003 0ustar ripleyusers\name{"ids<-.GGobiData"} \alias{ids<-.GGobiData} \alias{ids<-} \title{Set row ids} \author{Hadley Wickham } \description{ Set row ids from a GGobiData } \usage{\S3method{ids}{GGobiData}(x) <- value} \arguments{ \item{x}{GGobiData} \item{value}{new values} } \seealso{\code{\link{ids}}} \keyword{manip} rggobi/man/rownames-GGobiData-pv.rd0000644000176000001440000000046511777226050016726 0ustar ripleyusers\name{rownames.GGobiData} \alias{rownames.GGobiData} \title{Get row names} \author{Hadley Wickham } \description{ Get row names for a GGobiData } \usage{\S3method{rownames}{GGobiData}(x)} \arguments{ \item{x}{ggobiDataget} \item{}{new names} } \keyword{attribute} \keyword{internal} rggobi/man/ggobi-pcp-c7.rd0000644000176000001440000000054511772563330015046 0ustar ripleyusers\name{ggobi_pcp} \alias{ggobi_pcp} \title{Create parallel coordinates plot.} \author{Hadley Wickham } \description{ Mock up a pcp plot using points and edges. } \usage{ggobi_pcp(data, type="range")} \arguments{ \item{data}{} \item{type}{} } \details{Experimental and may suggest ways to reduce PCP code in GGobi} \keyword{internal} rggobi/man/ggobi-gtk-menu-bar-j4.rd0000644000176000001440000000056011772563330016556 0ustar ripleyusers\name{ggobi_gtk_menu_bar} \alias{ggobi_gtk_menu_bar} \title{Gtk menu bar} \author{Hadley Wickham } \description{ Retrieve RGtk object for menu bar } \usage{ggobi_gtk_menu_bar(.gobi = ggobi_get())} \arguments{ \item{.gobi}{} } \details{Useful for embedding in other applications or for listening to their signals via RGtk2.} \keyword{internal} rggobi/man/edges---GGobi-m7.rd0000644000176000001440000000054111777226016015415 0ustar ripleyusers\name{"edges<-.GGobi"} \alias{edges<-.GGobi} \title{Set edges} \author{Hadley Wickham } \description{ Create a new edges dataset and add to GGobi } \usage{\S3method{edges}{GGobi}(x) <- value} \arguments{ \item{x}{GGobi dataset} \item{value}{new edges} } \details{@arguments GGobi dataset @arguments new edges} \keyword{dynamic} rggobi/man/close-GGobi-kz.rd0000644000176000001440000000126511777225747015420 0ustar ripleyusers\name{close.GGobi} \alias{close.GGobi} \title{Close GGobi instance} \author{Hadley Wickham } \description{ Terminates and discards a ggobi instance } \usage{\S3method{close}{GGobi}(con, \dots)} \arguments{ \item{con}{ggobi object to close} \item{\dots}{ignored and for compatability generic function.} } \details{This allows the caller to close a ggobi instance and discard the resources it uses. The function closes the display windows and variable panel window associated with this ggobi instance. It also resets the default ggobi instance to be the last one created.} \examples{g1 <- ggobi(mtcars) g2 <- ggobi(mtcars) close(g2) close(ggobi_get())} \keyword{dynamic} rggobi/man/edges---GGobiData-qe.rd0000644000176000001440000000236011777243114016270 0ustar ripleyusers\name{"edges<-.GGobiData"} \alias{edges<-.GGobiData} \title{Set edges} \author{Hadley Wickham } \description{ Set edges for a dataset. } \usage{\S3method{edges}{GGobiData}(x) <- value} \arguments{ \item{x}{GGobiData} \item{value}{matrix, data frame, or graph containing of edges. First column should be from edge, second column to edge.} } \details{In GGobi, and edge dataset is a special type of dataset that has two additional (hidden) columns which specification source and destination row names. These rownames are compared to the row names of the dataset in the current plot, and if any match, it is possible to specify this dataset as an edge set to the plotted datset. When this is done, edges will be drawn between points specified by the edge dataset. To remove edges, set edges to NULL.} \seealso{\code{\link{ggobi_longitudinal}} for creating edges which simulate time series plots} \examples{cc<-cor(t(swiss),use="p", method="s") ccd<-sqrt(2*(1-cc)) a <- which(lower.tri(ccd), arr.ind=TRUE) src <- row.names(swiss)[a[,2]] dest <- row.names(swiss)[a[,1]] weight <- as.vector(as.dist(ccd)) gg <- ggobi(swiss) gg$cor <- data.frame(weight) edges(gg$cor) <- cbind(src, dest) edges(gg$cor) edges(gg$cor) <- NULL} \keyword{manip} rggobi/man/ggobi-get-2m.rd0000644000176000001440000000107711772563330015051 0ustar ripleyusers\name{ggobi_get} \alias{ggobi_get} \title{Get GGobi} \author{Hadley Wickham } \description{ Returns a ggobi reference } \usage{ggobi_get(id = ggobi_count(), drop=TRUE)} \arguments{ \item{id}{numeric vector indicating which ggobi instances to retrieve. Use default if none specified} \item{drop}{drop if possible?} } \details{This allows one to get a list of all the ggobi instances currently in existence in the R session. Also, one can fetch particular instances.} \examples{ggobi(mtcars) ggobi(Nile) ggobi_get(1) ggobi_get(1:2)} \keyword{dynamic} rggobi/aclocal.m40000644000176000001440000001417611772563474013444 0ustar ripleyusers# generated automatically by aclocal 1.11.5 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, # Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES rggobi/R/0000755000176000001440000000000011777224622011766 5ustar ripleyusersrggobi/R/colorSchemes.r0000644000176000001440000000141611772563330014576 0ustar ripleyusers# Set active colour scheme. # Specify the active color scheme in a GGobi instance or the session options. # # This makes a particular color scheme active within a GGobi instance. # # @arguments GGobi object # @arguments colour scheme to make active # @value The name of the previously active color scheme. # @keyword color #X g <- ggobi(mtcars) #X colorscheme(g) <- "Set1 8" #X colorscheme(g) <- 1 "colorscheme<-" <- function(x, value) { if(is.numeric(value)) value <- as.integer(value) .GGobiCall("setActiveColorScheme", value, .gobi = x) x } # Get active colour scheme # Get name of the active colour scheme # # @arguments GGobi object # @keyword color #X g <- ggobi(mtcars) #X colorscheme(g) colorscheme <- function(x) { .GGobiCall("getActiveColorScheme", .gobi = x) }rggobi/R/next-version/0000755000176000001440000000000011772563330014424 5ustar ripleyusersrggobi/R/next-version/plotLayout.S0000644000176000001440000000227211772563330016727 0ustar ripleyusers# # # # plotLayout <- function(..., mfrow = NULL, cells = NULL, .data = 1, .gobi=ggobi_get(), display = -1) { if(mode(display) == "numeric") { display <- as.integer(display) } else if(inherits(display, "ggobiDisplay")) display <- display[["ref"]] plots <- list(...) n <- length(plots) if(n == 0) plots <- NULL else { plots <- lapply(plots, resolvePlotDescription, .data = .data, .gobi = .gobi) } # We can compute this if it is missing and cells is not. if(length(mfrow) == 0) { nrows <- n # ceiling(sqrt(n)) ncols <- 1 # sqrt(n) mfrow <- c(nrows, ncols) } if(missing(cells)) cells <- t(gtkCells(mfrow[1], mfrow[2])) else { # We'll transpose gtkCells for you. if(ncol(cells) == 4) cells <- t(cells) } if(mode(.data) == "numeric") { .data <- as.integer(.data -1) } if(mode(.gobi) == "numeric") { .gobi <- as.integer(.gobi -1) } val <- .Call(.ggobi.symbol("createPlots"), plots, as.integer(mfrow), as.integer(cells-1), .gobi, display, .data, PACKAGE = "rggobi") gdk.flush() val } gtkCells <- function(r, c) { x <- rep(1:c, r) y <- rep(1:r, rep(c, r)) l <- cbind(left = x, right = x+1, top = y, bottom = y+1) l } rggobi/R/next-version/brush.r0000644000176000001440000000427511772563330015742 0ustar ripleyusers# GGobi brushing (size, location, glyph, etc) brushSize <- function(x, ...) UseMethod("brushSize") brushSize.GGobi <- function(.data = 1, .gobi = ggobi_get(), units=0) { ## Passing negative dimensions means that we just get the current value back .GGobiCall("setBrushSize", as.integer(c(-1,-1)), .gobi = x) } brushLocation <- function(x, ...) UseMethod("brushLocation") brushLocation.GGobi <- function(.data=1, .gobi = ggobi_get(), units=0) { setBrushLocation.ggobi(as.integer(-1), as.integer(-1), .data, .gobi=.gobi) } "brushLocation<-" <- function(x, value) { x <- value[1] y <- value[2] tmp <- .GGobiCall("setBrushLocation", as.integer(value), .gobi = x) if(!is.null(tmp)) names(tmp) <- c("x", "y") return(tmp) } setBrushLocation.ggobi <- function(x, y, .data = 1, .gobi = ggobi_get(), update = TRUE, units = 0) { } "brushSize<-" <- function(x, value) UseMethod("brushSize") "brushSize<-.GGobi" <- function(x, value) { w <- as.integer(value[1]) h <- as.integer(value[2]) tmp <- .GGobiCall("setBrushSize", as.integer(c(w,h)), .gobi = x) if(!is.null(tmp)) names(tmp) <- c("width", "height") return(tmp) } "brushColor<-" <- function(x, value) UseMethod("brushColor") "brushColor<-.GGobi" <- function(x, value) { if(value < 1 || value > 65535 || is.na(value)) stop("Color index must be positive and less than 65536.") .GGobiCall("setBrushColor", as.integer(id-1), .gobi=x) } brushColor <- function(x, ...) UseMethod("brushColor") brushColor.GGobi <- function(x) { .GGobiCall("getBrushColor", .gobi=x) } setBrushGlyph.ggobi <- function(type = -1, size = -1, .gobi = ggobi_get()) { if(missing(type) & missing(size)) stop("Must specify a glyph size or type") if(is.character(type)) { type <- mapGlyphType(type) } .GGobiCall("setBrushGlyph", as.integer(c(type, size)), .gobi=.gobi) return(TRUE) } brushGlyph <- function(x, ...) UseMethod("brushGlyph") brushGlyph.GGobi <- function(x) { x <- .GGobiCall("getBrushGlyph", .gobi = x) if(is.null(x)) return(x) n <- getGlyphTypes.ggobi() names(x) <- c( names(n)[x[1] == n], "size") x } glyphTypes <- function() .GGobiCall("getGlyphTypes") glyphSizes <- function() .GGobiCall("getGlyphSizes") rggobi/R/next-version/options.r0000644000176000001440000000203311772563330016300 0ustar ripleyusers # Get ggobi options # @keyword internal goptions <- function(x) UseMethod("goptions", x) # Get ggobi options # @keyword internal goptions.GGobiDisplay <- function(x) { .GGobiCall("getDisplayOptions", x) } goptions.GGobi <- function(x) { goptions.GGobiDisplay(NULL) } # @keyword internal "goptions<-" <- function(x, value) UseMethod("goptions<-", x) # Set defaults for display options # "goptions<-.GGobi" <- function(x, value) { goptions.GGobiDisplay(NULL) <- value } # Changes the settings of the display options for a display. # These options correspond to options available in the display menus in GGobi. # # Possible options: # # * "Show Points" # * "Show axes" # * "Show tour axes" # * "Show axes labels" # * "Directed edges" # * "Undirected edges" # * "Arrowheads" # * "Show whiskers" # # @arguments GGobiDisplay to modify # @arguments list of new settings # @keyword manip "goptions<-.GGobiDisplay" <- function(x, value) { old <- goptions(x) cur <- update(old, value) .GGobiCall("setDisplayOptions", cur, x) x } rggobi/R/next-version/PlotDescriptions.S0000644000176000001440000000435211772563330020061 0ustar ripleyusers# # These functions create a ``virtual'' description # of a ggobi plot without actually creating the plot. # They act as templates allowing the user to create # descriptions that can be resolved or instantiated # into real ggobi plots. # # See plotLayout() which takes a collection of these # plot descriptions and a layout specification and # creates a new display with the instantiated plots. parallelCoordDescription <- function(..., .data = -1, .gobi=NULL) { pl <- list(vars = c(...), ggobi=.gobi, .data=.data) class(pl) <- ifelse(length(pl$vars) > 1, "MultipleParallelCoordinates", "ParallelCoordinates") pl } ashDescription <- function(x, .data = -1, .gobi=NULL) { pl <- list(vars = x, ggobi=.gobi, .data=.data) class(pl) <- "GGobiAsh" pl } scatterplotDescription <- function(x, y, .data = -1, .gobi=NULL) { pl <- list(vars = c(x, y), ggobi=.gobi, .data=.data) class(pl) <- "ScatterPlot" pl } scatmatrixDescription <- function(..., .data = -1, .gobi=NULL) { pl <- list(vars = c(...), ggobi=.gobi, .data = .data) class(pl) <- "ScatmatrixPlot" pl } timeseriesDescription <- function(..., .data = -1, .gobi = NULL) { pl <- list(vars=c(...), ggobi=.gobi, .data = .data) class(pl) <- "TimeSeriesPlot" pl } plotList <- function(..., mfrow = NULL, cells = NULL) { plots <- list(plots = list(...), mfrow = mfrow, cells = cells) class(plots) <- "ggobiPlotList" return(plots) } resolvePlotDescription <- # # Transforms variable names into indices # by resolving them relative to the specified # dataset within the given ggobi instance # function(desc, .data = 1, .gobi = ggobi_get(), isError = TRUE) { if(is.null(desc)) return(NULL) if(is.character(desc$vars)) { if(!is.null(desc$ggobi)) { .gobi <- desc$ggobi } else desc$ggobi <- .gobi if(desc$.data > -1) { .data <- desc$.data } else desc$.data <- .data nms <- getVariableNames.ggobi(.data = .data, .gobi= .gobi) idx <- match(desc$vars, nms) if(any(is.na(idx)) && isError) stop(paste("Cannot resolve variable name", desc$vars[is.na(idx)],"in ggobi")) desc$vars <- idx } else { desc$vars <- as.integer(desc$vars) if(desc$.data < 0) desc$.data <- .data if(is.null(desc$ggobi)) desc$ggobi <- .gobi } desc } rggobi/R/next-version/brush.S0000644000176000001440000000437311772563330015702 0ustar ripleyusers# GGobi brushing (size, location, glyph, etc) getBrushSize.ggobi <- function(.data = 1, .gobi = ggobi_get(), units=0) { # Passing negative dimensions means that we just get the current value back setBrushSize.ggobi(as.integer(-1), as.integer(-1), .gobi=.gobi) } brush_location.ggobi <- function(.data=1, .gobi = ggobi_get(), units=0) { setBrushLocation.ggobi(as.integer(-1), as.integer(-1), .data, .gobi=.gobi) } setBrushLocation.ggobi <- function(x, y, .data = 1, .gobi = ggobi_get(), update = TRUE, units = 0) { if(length(x) > 1 && missing(y)) { x <- as.integer(x) y <- as.integer(x[2]) } if(mode(.data) == "numeric") .data <- as.integer(.data - 1) tmp <- .GGobiCall("setBrushLocation", as.integer(c(x[1],y[1])), .data, .gobi = .gobi) if(!is.null(tmp)) names(tmp) <- c("x", "y") return(tmp) } setBrushSize.ggobi <- function(w, h, .data = 1, .gobi = ggobi_get(), update = TRUE, units = 0) { if(length(w) > 1 && missing(h)) { w <- as.integer(w) h <- as.integer(w[2]) } if(mode(.data) == "numeric") .data <- as.integer(.data - 1) tmp <- .GGobiCall("setBrushSize", as.integer(c(w[1],h[1])), .data, .gobi = .gobi) if(!is.null(tmp)) names(tmp) <- c("width", "height") return(tmp) } setBrushColor.ggobi <- function(id, .gobi = ggobi_get()) { if(is.character(id)) { which <- match(id, rownames(getColorMap.ggobi(.gobi))) if(any(is.na(which))) { stop(paste("Unrecognized color(s)", id[is.na(which)])) } id <- which } .GGobiCall("setBrushColor", as.integer(id-1), .gobi=.gobi) } getBrushColor.ggobi <- function(.gobi = ggobi_get()) { .GGobiCall("getBrushColor", .gobi=.gobi) } setBrushGlyph.ggobi <- function(type = -1, size = -1, .gobi = ggobi_get()) { if(missing(type) & missing(size)) stop("Must specify a glyph size or type") if(is.character(type)) { type <- mapGlyphType(type) } .GGobiCall("setBrushGlyph", as.integer(c(type, size)), .gobi=.gobi) return(TRUE) } getBrushGlyph.ggobi <- function(.gobi = ggobi_get()) { x <- .GGobiCall("getBrushGlyph", .gobi = .gobi) if(is.null(x)) return(x) n <- getGlyphTypes.ggobi() names(x) <- c( names(n)[x[1] == n], "size") x } getGlyphTypes.ggobi <- function() .GGobiCall("getGlyphTypes") getGlyphSizes.ggobi <- function() .GGobiCall("getGlyphSizes") rggobi/R/next-version/colour-schemes.r0000644000176000001440000000772211772563330017547 0ustar ripleyuserssetClass("Color", representation()) setClass("RGBColor", representation("Color", "numeric"), prototype = c(red=0,green=0,blue=0)) setClass("ColorScheme", representation( colors="list", background="Color", annotations="Color", criticalvalue = "integer", description = "character", type = "integer", system = "integer", name="character" ) ) # Retrieve R descriptions of GGobi color schemes # Retrieve R descriptions of GGobi color schemes # # This retrieves R objects representing a collection of GGobi color schemes # directly from GGobi itself. It can access either a particular GGobi # instance's color scheme list or the session-wide schemes. Color schemes # can also be read from their XML representation, but this allows one to query # the actual ones that are available to a GGobi session or instance. # # @arguments the GGobi instance from which to query the color schemes, defaults to active # @value A list of the color schemes in the GGobi list. Each element is of class \code{ColorScheme}. # @ref \references{\url{http://www.ggobi.org}} # @seealso \link{addColorScheme}, \link{setActiveColorScheme} # @keyword color getColorSchemes <- function(.gobi = NULL) { .GGobiCall("getColorSchemes", .gobi = .gobi) } # Adds a color scheme to a GGobi instance or the global color scheme list. # Adds a color scheme to a GGobi instance or the global color scheme list. # # This takes an R color scheme description and adds an equivalent representation # to either the color schemes available to a particular GGobi instance or to the global # list of color schemes within a GGobi session. # # @arguments the \code{ColorScheme object. } # @arguments the name to identify/describe the scheme. # @arguments a logical value indicating whether we should replace any existing entry with this name with the new scheme (\code{TRUE}), or simply append the new scheme to the end of the list. #@arguments a logical value that indicates whether to also make this the active color scheme. See \code{setActiveColorScheme} # @arguments the GGobi instance to which to append the new color scheme, or if \code{NULL}, the color scheme is added to the session options and will be available to new GGobi instances created after this. # @value The index/position in the appropriate list of color schemes to which the new scheme was added. # @keyword color addColorScheme <- function(scheme, name = scheme@name, overwrite = FALSE, set = FALSE, .gobi = NULL) { ans <- .GGobiCall("addColorScheme", scheme, as.character(name), as.logical(overwrite), .gobi = .gobi) if (set) setActiveColorScheme(name, .gobi = .gobi) ans } # Map names to color values in a ggobi instance. # Map names to color values in a ggobi instance. # # This currently does not work but will when color schemes are enabled in GGobi. # # Colors in ggobi are represented by entries in a color table or matrix as # Red, Green and Blue values. To set a color, one can identify the entry in that # table either by number/index or by name. This function maps color names to the # corresponding index so that these values can be passed to the low-level C routines. # This function is typically called internally. # # @arguments names of colors to be resolved in the specified color scheme of the ggobi instance. # @arguments the name of color scheme of interest in which to resolve the color names. # @arguments the ggobi instance whose color schemes are to be used to resolve the \code{scheme}, if \code{NULL}, the color schemes from the GGobi session options are used. # @value An integer vector specifying the indices of the entries in the color scheme corresponding to the specified names. # @keyword color resolveColors.ggobi <- function(colNames, scheme) { if (is.numeric(colNames)) return(as.integer(colNames)) if(missing(scheme) || as.character(scheme) == "") { scheme = getActiveColorScheme() } else { scheme = getColorSchemes()[[as.character(scheme)]] } match(as.character(colNames), names(scheme@colors)) } rggobi/R/display-variables.r0000644000176000001440000001072211772563330015563 0ustar ripleyusers# Display construction # Create a new display # # @keyword internal display <- function(x, ...) UseMethod("display", x) # Create a new display # Create a new display for the GGobiData object. # # This function allows you to create a new display from # a GGobiData object. You will need to specify the type of display you # want ("Scatterplot Display", "Scatterplot Matrix" and "Parallel Coordinates # Display" are the most common), and which variables the plot # should be intialised with. Specifying more than two variables only makes # sense for scatterplot matrices and pcps. # # Many of the plots used in GGobi (eg. the tours and densities plots) are # special modes of the scatterplot display. You will need to create a # new scatterplot display, change the projection mode to what you want, # and then set the variables. Hopefully this will be improved in a future # version of rggobi. # # @arguments GGobiData object # @arguments projection mode to use # @arguments variables to display, see \code{\link{variables.GGobiDisplay}} for details # @arguments If TRUE, returns widget for use with RGtk2 # @arguments ignored # @seealso \code{\link{ggobi_display_types}} for a list of display types # @keyword dynamic #X g <- ggobi(mtcars) #X display(g[1]) #X display(g[1], vars=list(X=4, Y=5)) #X display(g[1], vars=list(X="drat", Y="hp")) #X display(g[1], "Parallel Coordinates Display") #X \dontrun{ #X display(g[1], "2D Tour") #X display(g[1], "2x1D Tour", list(X=c(1,2,3), Y=c(4,5,6))) #X } #X display(g[1], "Scatterplot Matrix") display.GGobiData <- function(x, pmode="Scatterplot Display", vars=list(X=names(x)), embed=FALSE, ...) { type <- pmodes()[pmode] ivars <- variable_index(x, vars) embed <- as.logical(embed) d <- .GGobiCall("createDisplay", ggobi_display_make_type(type), ivars$X, x, !embed) if (type != pmode) { pmode(d) <- pmode } variables(d) <- vars d } # Get variables # Get variable names from a container # # @keyword internal variables <- function(x) UseMethod("variables", x) # Set variables # Set variable names in a container # # @keyword internal "variables<-" <- function(x, value) UseMethod("variables<-", x) # Get display variables # List the variables used in a given display # # There are three types of variables in GGobi displays: # X, Y, Z, which correspond to the labels on the toggle buttons # in GGobi. Most plots have a constrained set of possible options. # For example, in tours you can only set X variables, and you must # have at least three. Or in the rotation plot, you need exactly # one X, Y, and Z variable. You can figure out what these # conditions are by using the toggle buttons in GGobi. # # @arguments GGobiDisplay object # @keyword dynamic # @seealso \code{\link{variables<-.GGobiDisplay}} for examples variables.GGobiDisplay <- function(x) { vars <- .GGobiCall("getDisplayVariables", x, .gobi=ggobi(x)) names(vars[[1]]) <- colnames(dataset(x))[vars[[1]] + 1] split(vars[[1]] + 1, factor(vars[[2]], levels = c("X", "Y", "Z"))) } # Set display variables # Set display variables with a list of x, y, and z component variable indices. # # There are three types of variables in GGobi displays: # x, y, z, which correspond to the labels on the toggle buttons # in GGobi. Most plots have a constrained set of possible options. # For example, in tours you can only set x variables, and you must # have at least three. Or in the rotation plot, you need exactly # one x, y, and z variable. # # Currently, there is no checking done to ensure that you are # sending a sensible set of variables for the given display type. # Generally, any invalid choices will be silently ignored. # # @arguments GGobiDisplay object # @arguments list with X, Y and Z components listing the variable indices to display, either as numeric position or character variable name # @keyword dynamic #X g <- ggobi(mtcars) #X d <- display(g[1], "Parallel Coordinates Display") #X variables(d) #X variables(d) <- list(X=1:8) #X variables(d) <- list(X=c("mpg", "cyl")) #X variables(d) "variables<-.GGobiDisplay" <- function(x, value) { stopifnot(is.list(value)) names(value) <- toupper(names(value)) d <- dataset(x) prev_vars <- variable_index(d, variables(x)) new_vars <- variable_index(d, value) if (any(is.na(new_vars))) stop("Variable(s) ", paste(value[is.na(new_vars)], collapse=", "), " not in dataset") prev_vars <- mapply(setdiff, prev_vars, new_vars, SIMPLIFY=FALSE) .GGobiCall("setDisplayVariables", new_vars, prev_vars, x, .gobi=ggobi(x)) x } rggobi/R/edges.r0000644000176000001440000000633411777223724013250 0ustar ripleyusers # Get edges # Get edges for a dataset # # @arguments ggobi dataset # @value A matrix of edge pairs # @keyword manip edges <- function(x) { m <- .GGobiCall("getSymbolicEdges", x) if (ncol(m) == 2) colnames(m) <- c("source", "destination") m } # Get connecting edges # Get actual edges from application of edges dataset to target dataset. # # @arguments target ggobi dataset # @arguments ggobi dataset containing edges # @keyword manip connecting_edges <- function(x, y) { m <- .GGobiCall("getConnectedEdges", y, x) + 1 if (ncol(m) == 2) colnames(m) <- c("source", "destination") m } # Set edges # Generic method, see methods for more details # # @keyword internal "edges<-" <- function(x, value) UseMethod("edges<-", x) # Set edges # Set edges for a dataset. # # In GGobi, and edge dataset is a special type of dataset that has # two additional (hidden) columns which specification source and # destination row names. These rownames are compared to the row # names of the dataset in the current plot, and if any match, it # is possible to specify this dataset as an edge set to the plotted # datset. When this is done, edges will be drawn between points # specified by the edge dataset. # # To remove edges, set edges to NULL. # # @arguments GGobiData # @arguments matrix, data frame, or graph containing of edges. First column should be from edge, second column to edge. # @keyword manip # @seealso \code{\link{ggobi_longitudinal}} for creating edges which simulate time series plots #X cc<-cor(t(swiss),use="p", method="s") #X ccd<-sqrt(2*(1-cc)) #X a <- which(lower.tri(ccd), arr.ind=TRUE) #X src <- row.names(swiss)[a[,2]] #X dest <- row.names(swiss)[a[,1]] #X weight <- as.vector(as.dist(ccd)) #X gg <- ggobi(swiss) #X gg$cor <- data.frame(weight) #X edges(gg$cor) <- cbind(src, dest) #X edges(gg$cor) #X edges(gg$cor) <- NULL "edges<-.GGobiData" <- function(x, value) { if (is.null(value)) return(invisible(.GGobiCall("setEdges", character(0), character(0), FALSE, x))) if(is(value, "graphNEL")) { value <- matrix(graph::nodes(value)[t(graph::edgeMatrix(value))], ncol=2) } src <- value[,1] dest <- value[,2] if (is.numeric(src)) src <- rownames(x)[src] if (is.numeric(dest)) dest <- rownames(x)[dest] .GGobiCall("setEdges", as.character(src), as.character(dest), FALSE, x) x } # Set edges # Set edges for a display # # This sets the dataset that a GGobiDisplay uses # to display edges. # # @arguments GGobiDisplay object # @arguments GGobiData object that contains edges # @keyword dynamic "edges<-.GGobiDisplay" <- function(x, value) { if (is.null(value)) { .GGobiCall("setDisplayEdges", list(x), value, FALSE, FALSE) } else { .GGobiCall("setDisplayEdges", list(x), value, FALSE, TRUE) } x } # Set edges # Create a new edges dataset and add to GGobi # # @arguments GGobi dataset # @arguments new edges # # @keyword dynamic "edges<-.GGobi" <- function(x, value) { name <- deparse(substitute(value)) if(is(value, "graphNEL")) { names <- graph::nodes(value) value <- t(graph::edgeMatrix(value)) value <- cbind(names[value[, 1]], names[value[, 2]]) } df <- data.frame(id=1:nrow(value)) rownames(df) <- paste(name, 1:nrow(df), sep="") x[[name]] <- df y <- x[[name]] edges(y) <- value x } rggobi/R/utils.r0000644000176000001440000000000011772563330013274 0ustar ripleyusersrggobi/R/glyphs.r0000644000176000001440000001371311772563330013461 0ustar ripleyusers# "Manual" brushing # Set colours and glyphs # ============================================================================ # Map glyph type. # Map glyph character code to number # # @arguments vector of glyph character codes # @keyword dynamic # @keyword internal mapGlyphType <- function(types) { if (!is.character(types)) return(as.integer(types)) stop("Character glyph types not yet supported") #sys.types <- getGlyphTypes.ggobi() #ids <- match(types, names(sys.types)) #if (any(is.na(ids))) { # stop(paste("Invalid glyph name(s):",paste(types[is.na(ids)], collapse=", "))) #} #ids } glyph_type <- function(x) UseMethod("glyph_type", x) "glyph_type<-" <- function(x, value) UseMethod("glyph_type<-", x) glyph_size <- function(x) UseMethod("glyph_size", x) "glyph_size<-" <- function(x, value) UseMethod("glyph_size<-", x) glyph_color <- glyph_colour <- function(x) UseMethod("glyph_colour", x) "glyph_color<-" <- "glyph_colour<-" <- function(x, value) UseMethod("glyph_colour<-", x) # Get glyph type. # Get glyph type. # # Glyph type refers to the shape of the glyph, one of: # # \itemize{ # \item a filled circle # \item an empty circle # \item a filled square # \item an empty square # \item a single pixel # \item a plus sign # \item a cross # } # # @alias glyph_type # @arguments GGobiData # @keyword dynamic # @seealso \code{\link{glyph_type<-}} glyph_type.GGobiData <- function(x) { which <- 1:nrow(x) .GGobiCall("getCaseGlyphs", as.integer(which - 1), x, .gobi = attr(x, "ggobi"))$type + 1 } # Set glyph type # Set glyph type # # @alias glyph_type<- # @arguments GGobiData # @arguments vector of new types # @keyword dynamic # @seealso \code{\link{glyph_type}} "glyph_type<-.GGobiData" <- function(x, value) { which <- 1:nrow(x) types <- mapGlyphType(value) types <- rep(types - 1, length=length(which)) sizes <- rep(as.integer(-1), length(which)) .GGobiCall("setCaseGlyphs", as.integer(types), as.integer(sizes), as.integer(which - 1), x, .gobi = attr(x, "ggobi")) x } # Get glyph size # Get glyph size # # Glyph size is an integer between 1 and 6. # # @alias glyph_size # @arguments GGobiData # @keyword dynamic # @seealso \code{\link{glyph_size<-}} glyph_size.GGobiData <- function(x) { which <- 1:nrow(x) .GGobiCall("getCaseGlyphs", as.integer(which - 1), x, .gobi = attr(x, "ggobi"))$size + 1 } # Set glyph size # Set glyph size # # Glyph size is an integer between 1 and 6. # # @alias glyph_size<- # @arguments GGobiData # @arguments vector of new sizes # @keyword dynamic # @seealso \code{\link{glyph_size}} "glyph_size<-.GGobiData" <- function(x, value) { which <- 1:nrow(x) sizes <- rep(value - 1, length=length(which)) types <- rep(as.integer(-1), length(which)) .GGobiCall("setCaseGlyphs", as.integer(types), as.integer(sizes), as.integer(which - 1), x, .gobi = attr(x, "ggobi")) x } # Get glyph colour # Get glyph colour # # @alias glyph_colour # @arguments GGobiData # @alias glyph_color # @keyword dynamic # @seealso \code{\link{glyph_colour<-}} glyph_colour.GGobiData <- function(x) { which <- 1:nrow(x) .GGobiCall("getCaseColors", as.integer(which - 1), x, .gobi = attr(x, "ggobi")) + 1 } # Set glyph colour # Set glyph colour # # @alias glyph_colour<- # @alias glyph_color<- # @arguments GGobiData # @arguments vector of new colours # @seealso \code{\link{glyph_colour}} # @keyword dynamic "glyph_colour<-.GGobiData" <- function(x, value) { #colors <- resolveColors.ggobi(value) colors <- rep(as.integer(value), length=nrow(x)) ind <- 0:(length(colors)-1) if(any(colors < 1) || any(colors > 65535) || is.na(colors)) stop("All color indices must be positive and less than 65536.") .GGobiCall("setCaseColors", colors, as.integer(ind), x) x } # Sampling, selection, hiding, exclusion # ============================================================================ # Get and set exclusion # Get and set the exclusion status of points # # @keyword internal # @alias excluded<- excluded <- function(x) UseMethod("excluded", x) "excluded<-" <- function(x, value) UseMethod("excluded<-", x) # Get excluded status # Get the exclusion status of points. # # If a point is excluded it is not drawn. # # @arguments ggobiDataget # @keyword dynamic # @seealso \code{\link{excluded<-}} excluded.GGobiData <- function(x) { .GGobiCall("getExcludedIndices", .data = x) } # Set excluded status # Set the exclusion status of points. # # If a point is excluded it is not drawn. # # @arguments GGobiData # @arguments logical vector # @keyword dynamic # @seealso \code{\link{excluded}} "excluded<-.GGobiData" <- function(x, value) { .GGobiCall("setExcludedIndices", rep(as.logical(value), length=nrow(x)), .data = x) x } # Get selection status # Returns logical vector indicating if each point is under the brush # # @alias selected # @arguments GGobiData # @arguments logical vector # @keyword dynamic selected.GGobiData <- function(x) { sel <- .GGobiCall("getSelectedIndices", .data=x) if(is.null(sel)) logical(nrow(x)) else { !is.na(match(seq(1, length = nrow(x)), sel)) } } selected <- function(x) UseMethod("selected", x) # Get shadowed status # Get the exclusion status of points. # # If a point is shadowed it is drawn in a dark gray colour, # behind all non-shadowed points. It cannot be selected. # # @alias shadowed # @arguments ggobiDataget # @keyword dynamic # @seealso \code{\link{shadowed<-}} shadowed.GGobiData <- function(x) { .GGobiCall("getCasesHidden", .data=x) } shadowed <- function(x) UseMethod("shadowed", x) # Set shadowed status # Set the exclusion status of points. # # If a point is shadowed it is drawn in a dark gray colour, # behind all non-shadowed points. It cannot be selected. # # @alias shadowed<- # @arguments GGobiData # @arguments logical vector # @keyword dynamic # @seealso \code{\link{shadowed}} "shadowed<-.GGobiData" <- function(x, value) { .GGobiCall("setCasesHidden", rep(as.logical(value), length=nrow(x)), as.integer((1:nrow(x))-1), .data = x) x } "shadowed<-" <- function(x, value) UseMethod("shadowed<-", x) rggobi/R/call.r0000644000176000001440000000622711772563330013070 0ustar ripleyusers # GGobi symbol creation # Maps the given name to the name of the corresponding C routine # # A simple way of generating the prefix for a symbol # used in this package/library so that we can hide # it from other packages and avoid conflicts. # # @keyword dynamic # @keyword internal # @value the name of the C routine corresponding to its argument .ggobi.symbol <- function(name) paste("RS_GGOBI", name, sep="_") # Calling native routines # Wrappers for calling C routines in the R-ggobi library. # # \code{.GGobiC} and \code{.GGobiCall} convert the name and then call # their C invocation counterparts. # # These functions map the simple name of a C routine into the # package-specific version of that name. These allow use to hide the # use a name \emph{mangling} scheme of our choosing for the C level # routines in the shared library/DLL that provides the glue between R # and ggobi. This is useful for avoiding name conflicts with other C # code in R or other packages. These are only of relevance to the # developers of this package and those working with its C code. # # The mapping of the name to its corresponding C routine name # is done in conjunction with the pre-processor macro # \code{RS_GGOBI}. These must be synchronized. # # @alias .GGobiC # @arguments the simple name of the C routine to be resolved # @arguments the arguments that to be passed to the \code{\link{.C}} or \code{\link{.Call}} # @arguments the ggobi instance identifier that is to be passed to the C routine as its last argument # @value the same result as the corresponding \code{.C} and \code{.Call} # @references \url{http://www.ggobi.org/} # @seealso \code{\link{.C}}, \code{\link{.Call}} # @keyword dynamic # @keyword internal .GGobiCall <- function(.name, ..., .gobi = ggobi_get(), .test=TRUE) { if (.test && !is.null(.gobi) && !valid_ggobi(.gobi)) stop("Invalid ggobi reference", call.=FALSE) .Call(.ggobi.symbol(.name), ..., .gobi, PACKAGE = "rggobi") } .GGobiC <- function(.name, ..., .gobi = ggobi_get(), .test=TRUE) { if (.test && !is.null(.gobi) && !valid_ggobi(.gobi)) stop("Invalid ggobi reference", call.=FALSE) sym <- .ggobi.symbol(.name) if (!is.null(.gobi)) .C(sym, ..., .gobi, PACKAGE = "rggobi") else .C(sym, ..., PACKAGE = "rggobi") } # Validity checking # Determines whether a reference to an internal ggobi object is valid # # One can create multiple, independent ggobi instances within a single # R session and one can also remove them either programmatically or # via the GUI. To be able to refer to these objects which are # actually C-level internal objects, one has a reference or handle # from an S object. Since the C level object can be destroyed while the S # object still refers to them, this function allows one to check whether the # internal object to which R refers is still in existence. # # @arguments an object of class \code{ggobi} which refers to an internal ggobi instance. # @value \code{TRUE} if real object still exist, \code{FALSE} otherwise # @keyword dynamic #X g <- ggobi(mtcars) #X valid_ggobi(g) #X close(g) #X valid_ggobi(g) # @keyword internal valid_ggobi <- function(.gobi) { .GGobiCall("isValid", .gobi=.gobi, .test=FALSE) } rggobi/R/data.r0000644000176000001440000001135211772563330013061 0ustar ripleyusers# Set data # =================================================================== # [<-.GGobi # Add data to ggobi instance. # # This function allows you to add (and eventually) replace # GGobiData objects in a GGobi instance. # # @arguments ggobi instance # @arguments name of data frame # @arguments data.frame, or string to path of file to load # @alias $<-.GGobi # @alias [[<-.GGobi # @keyword manip #X g <- ggobi() #X g["a"] <- mtcars #X g$b <- mtcars "[<-.GGobi" <- function(x, i, value) { if (inherits(value, "GGobiData")) return(x) if (length(i) != 1) stop("You may only add or replace one dataset at a time") replace <- (i %in% names(x)) if (replace) { warning("Replacement does not work") return(x) } if(is.character(value)) { ggobi_set_data_file(value, .gobi = x) } else { ggobi_set_data_frame(as.data.frame(value), name = clean.ggobi(i), .gobi = x) } x } "[[<-.GGobi" <- "$<-.GGobi" <- function(x, i, value) { x[i] <- value x } # Set data file. # Open data file and add to ggobi datasets. # # @arguments path to file # @arguments mode of file # @arguments add? # @arguments ggobi instance # @returns GGobiData # @keyword manip # @keyword internal ggobi_set_data_file <- function(file, mode = "unknown", add = TRUE, .gobi = ggobi_get()) { num <- .GGobiCall("setFile", as.character(file), as.character(mode), as.logical(add), .gobi = .gobi) if(num > -1) { dataset(num, .gobi) } else { warning(paste("Failed to open", file)) } } # Set data frame. # Add data.frame to ggobi instance. # # @arguments data frame to add # @arguments data set name (appears on tabs in ggobi) # @arguments description of data frame # @arguments rownames # @arguments ggobi instance # @returns GGobiData # @keyword manip # @keyword internal ggobi_set_data_frame <- function(data, name = deparse(sys.call()[[2]]), description = paste("R data frame", name), id = NULL, .gobi = ggobi_get()) { n <- dimnames(data) if (is.null(id)) { if (.row_names_info(data) < 0) { id <- paste(name, seq(1, nrow(data)), sep="") } else { id <- rownames(data) } } else { if (length(id) != nrow(data)) stop("Length of id does not match rows of data") } # Convert character columns to factors char <- unlist(lapply(data, is.character)) data[char] <- lapply(data[char], factor) .data <- .GGobiCall("addData", data, n[[1]], n[[2]], dim(data), as.character(description), as.character(name), as.character(id), .gobi = .gobi) .data } # Get data # =================================================================== # Get ggobi data. # Conveniently retrieve ggobi dataset. # # It is convenient to be able to refer to and operate on a ggobi # dataset as if it were a regular R dataset. This function allows one to # get an \code{GGobiData} object that represents a particular # dataset. # # @arguments GGobi object # @arguments name of dataset to retrive # @arguments ignored # @arguments if TRUE, return vector is possible # @keyword manip # @alias [[.GGobi # @alias $.GGobi #X g <- ggobi(ChickWeight) #X g["cars"] <- mtcars #X g[1:2] #X g["ChickWeight"] #X g["cars"] #X g$cars "[.GGobi" <- function(x, i, ..., drop=TRUE) { d <- dataset(clean.ggobi(i), .gobi = x) if (drop && length(d) == 1 ) { d[[1]] } else { d } } "[[.GGobi" <- "$.GGobi" <- function(x, i) { x[i] } # Generic method for getting dataset # @keyword internal dataset <- function(x, .gobi = ggobi_get()) UseMethod("dataset", x) # Get ggobi dataset. # Get an object representing an internal ggobi dataset # # It is convenient to be able to refer to and operate on a ggobi # dataset as if it were a regular R dataset. This function allows one to # get an \code{GGobiData} object that represents a particular # dataset. # # @arguments which dataset to retrieve, an integer for positional matching or a character to match by name # @arguments GGobi instance # @value A list of \code{GGobiData} objects # @seealso \code{\link{$.GGobiData}} for user level selection of datasets # @keyword manip # @keyword internal # @alias dataset.character dataset.numeric <- function(x, .gobi = ggobi_get()) { refs <- .GGobiCall("getDataset", as.integer(x-1), .gobi=.gobi) refs <- lapply(refs, function(x) { if(is.null(x)) return() #class(x) <- c(class(x), "data.frame"); attr(x,"ggobi") <- .gobi x }) refs } dataset.character <- function(x, .gobi = ggobi_get()) { id <- match(x, names(.gobi)) if (any(is.na(id))) { stop(paste("Unrecognized dataset name", x[is.na(id)])) } dataset(id, .gobi) } # Write xml # Write GGobi xml for specific dataset to filename # # @arguments GGobiData object # @arguments path to write file to # @keyword manip # ggobi_data_write_xml <- function (gd, filename) { # refs <- lapply(.data, dataset, .gobi) # .GGobiCall("writeDatasetsXML", gd, as.character(filename)) # } rggobi/R/datasets.r0000644000176000001440000001736711772563330013774 0ustar ripleyusers# Basic data set manipulation # # Subsetting, dimensions, names etc. # Attempts to mimick R data frames as closely as possible # ============================================================================ # Print GGobiData # Print GGobiData # # By default printing a GGobiData acts like # printing an R data.frame - ie. show all the data # # @arguments GGobi dataset to retrieve # @keyword attribute # @keyword internal print.GGobiData <- function(x, ...) { print(as.data.frame(x), ...) } # GGobiData dimensions # Retrieve the dimension of a GGobiData # # @arguments dataset # @keyword attribute # @keyword internal #X g <- ggobi(mtcars) #X dim(g[1]) dim.GGobiData <- function(x) { .GGobiCall("datasetDim", x) } # GGobiData rows # Retrieve the number of row in a GGobiData # # @arguments dataset # @keyword attribute # @keyword internal nrow.GGobiData <- function(d) dim(d)[2] # GGobiData columns # Retrieve the number of columns in a GGobiData # # @arguments dataset # @keyword attribute # @keyword internal ncol.GGobiData <- function(d) dim(d)[1] # GGobiData column names # Get column names for a GGobiData # # @arguments dataset # @keyword attribute # @keyword internal names.GGobiData <- function(x, ...) { .GGobiCall("getVariableNames", FALSE, x) } # Set column names # Set column names for a GGobiData # # @arguments GGobiData # @arguments new names # @keyword attribute # @keyword internal "names<-.GGobiData" <- function(x, value) { colnames(x) <- value x } # Variable index # Return indices corresponding to variable names # # @arguments GGobiData # @arguments variable names # @returns numeric vector of (0-based) positions # @keyword attribute # @keyword internal variable_index <- function(x, names) { if(length(names) == 0) return(integer(0)) #if(is.integer(names)) return(as.integer(names - 1)) if(is.numeric(names)) return(as.integer(names - 1)) if(is.character(names)) return(as.integer(match(names, names(x)) - 1)) def <- list(X = numeric(0), Y=numeric(0), Z=numeric(0)) if (!is.null(names$X)) def$X <- names$X if (!is.null(names$Y)) def$Y <- names$Y if (!is.null(names$Z)) def$Z <- names$Z lapply(def, function(name) variable_index(x, name)) } # Get row names # Get row names for a GGobiData # # @arguments ggobiDataget # @arguments new names # @keyword attribute # @keyword internal rownames.GGobiData <- function(x) { .GGobiCall("getRowNames", x) } # Set row names # Set row names for a GGobiData # # @arguments GGobiData # @arguments new names # @keyword attribute # @keyword internal #X g <- ggobi(mtcars) #X df <- g[1] #X rownames(df) #X rownames(df) <- tolower(rownames(df)) #X rownames(df) "rownames<-.GGobiData" <- function(x, value) { dims <- dimnames(x) stopifnot(length(x) == length(dims[1])) dims[1] <- value dimnames(x) <- dims x } # Get dimension names # Get row and column names for a GGobiData # # @arguments ggobiDataget # @keyword attribute # @keyword internal dimnames.GGobiData <- function(x) { list(rownames.GGobiData(x), names(x)) } # Set dim names # Set dim names for a GGobiData # # @arguments GGobiData # @arguments new names # @keyword attribute # @keyword internal "dimnames<-.GGobiData" <- function(x, value) { .GGobiCall("setRowNames", as.character(value[[1]]), as.integer(1:length(value[[1]]) - 1), x) .GGobiCall("setVariableNames", as.integer(1:ncol(x) -1 ), as.character(value[[2]]), x) x } # Summarise GGobiData. # Summarise a GGobiData with dimensions, mode and variable names. # # @arguments GGobiData # @arguments ignored # @keyword attribute summary.GGobiData <- function(object, ...) { list(dim = dim(object), mode = mode(object), variables = names(object)) } # Subsettting # Subsetting for ggobi datasets # # This functions allow one to treat a ggobi dataset as if it were a local # data.frame. One can extract and assign elements within the dataset. # # This method works by retrieving the entire dataset into # R, and then subsetting with R. # # @arguments ggobi dataset # @arguments rows # @arguments cols # @arguments drop dimensions? # @value desired subset from data.frame # @alias [[.GGobiData # @alias $.GGobiData # @keyword manip #X g <- ggobi(mtcars) #X x <- g$mtcars #X x[1:5, 1:5] #X x[[1]] #X x$cyl "[.GGobiData" <- function(x, i, j, drop=FALSE) { as.data.frame(x)[i, j, drop=drop] } "$.GGobiData" <- "[[.GGobiData" <- function(x, i) { as.data.frame(x)[[i]] } # Conversion methods # Convert a GGobiData to a regular R data.frame or matrix # # @arguments GGobiData # @keyword manip # @keyword internal # @alias as.matrix.GGobiData "as.data.frame.GGobiData" <- function(x, ...) { gd <- .GGobiCall("getData", x) df <- as.data.frame(gd) rownames(df) <- rownames(x) df } "as.matrix.GGobiData" <- function(x, ...) { as.matrix(as.data.frame(x)) } # Assignments for ggobi datasets # This functions allow one to treat a ggobi dataset as if it were a local data.frame. One can extract and assign elements within the dataset. # # This method works by retrieving the entire dataset into # R, subsetting that copy, and then returning any changes. # # @arguments ggobi dataset # @arguments row indices # @arguments column indices # @arguments new values # @keyword manip # @keyword internal # @alias $<-.GGobiData # @alias [[<-.GGobiData #X g <- ggobi(mtcars) #X x <- g["mtcars"] #X x[1:5, 1:5] #X x[1:5, 1] <- 1:5 #X x[1:5, 1:5] "[<-.GGobiData" <- function(x, i, j, value) { data <- as.data.frame(x) # figure out if any new columns have been added and add them. if (missing(i)) data[,j] <- value else if (missing(j)) data[i,] <- value else data[i, j] <- value for(var in unique(j)) { x[[var]] <- data[[var]] } x } "$<-.GGobiData" <- "[[<-.GGobiData" <- function(x, i, value) { df <- as.data.frame(x) if (is.null(value)) { ggobi_data_remove_variable(x, i) } else if (is.null(df[[i]])) { ggobi_data_add_variable(x, value, i) } else { ggobi_data_set_variable(x, value, i) } x } # Set variable values # Set the variable values for a column in a GGobiData # # @arguments GGobiData # @arguments values of new variable # @arguments variable name # @arguments update? # @keyword internal ggobi_data_set_variable <- function(x, vals, var, update = TRUE) { varId <- variable_index(x, var) if(any(is.na(varId))) stop("Invalid variable") .GGobiCall("setVariableValues", as.numeric(vals), as.integer(1:length(vals) - 1), varId, as.logical(update), x) x } # Add variable # Add variable to a GGobiData # # @alias addVariable # @arguments GGobiData # @arguments values to add # @arguments name of column to add # @keyword internal ggobi_data_add_variable <- function(x, vals, name, ...) { if (!(is.factor(vals) || is.numeric(vals))) stop("Variable must be a factor or numeric") if (length(vals) != nrow(x)) stop("Variable must be same length as existing data set") levels <- NULL values <- NULL if(is.factor(vals)) { levels <- table(vals) values <- sort(unique(as.integer(vals))) } .GGobiCall("addVariable", as.numeric(vals), as.character(name), levels, values, x) } # Remove variable # Remove variables from a GGobiData object # # @keyword internal ggobi_data_remove_variable <- function(x, var) { varId <- variable_index(x, var) if(any(is.na(varId))) stop("Invalid variable") .GGobiC("removeVariables", varId, x)[[1]] } ids <- function(x) UseMethod("ids", x) "ids<-" <- function(x, value) UseMethod("ids<-", x) # Row ids # Retrive row ids from a GGobiData # # @alias ids # @arguments GGobiData # @keyword manip # @seealso \code{\link{ids<-}} ids.GGobiData <- function(x) { .GGobiCall("getCaseIds", x) } # Set row ids # Set row ids from a GGobiData # # @alias ids<- # @arguments GGobiData # @arguments new values # @keyword manip # @seealso \code{\link{ids}} "ids<-.GGobiData" <- function(x, value) { .GGobiCall("setIDs", as.character(value), .data=x) x } ## for S4 integration setOldClass("GGobiData") rggobi/R/zzz.r0000644000176000001440000000551611772563330013012 0ustar ripleyusers# Check structs # Validates GGobi and Rggobi views of internal data structures # # This function is called when the Rggobi library is loaded and it verifies # that the sizes of the different internal data structures for GGobi are the # same for both the GGobi shared library/DLL and the Rggobi package. This is # important as the two shared libraries are compiled separately and may have # different compilation flags, etc. that make them incompatible. This # function simply compares the sizes of the two views of the structures and # raises a warning if they do not agree. # # Essentially, you should never notice this function. A warning implies that # you need to re-install Rggobi against the version of GGobi you are using. # # @value TRUE if the sizes in the two libraries are the same, otherwise a named logical vector indicating which structures are different # # @keyword programming # @keyword internal ggobi_check_structs <- function() { ours <- .Call(.ggobi.symbol("getStructSizes"), TRUE, PACKAGE = "rggobi") theirs <- .Call(.ggobi.symbol("getStructSizes"), FALSE, PACKAGE = "rggobi") which <- match(names(ours), names(theirs)) if(any(is.na(which))) stop(paste("No information about some struct(s):", paste("`", names(ours)[is.na(which)],"'", collapse=", ", sep=""))) ok <- ours == theirs[which] if(!all(ok)) { warning("Some structs have different size: ", paste(paste(names(ours)[!ok], "(", ours[!ok], "!=", theirs[which][!ok], ")"), collapse=", "), ". You may have an incompatible version of GGobi installed.", call.=FALSE) return(ok) } TRUE } # check that rggobi and GGobi by major.minor versions are the same # to ensure binary compatibility # also make sure GGobi is later than 2.1.6, since that is where # we started the above version policy .check_versions <- function() { versions <- c( rggobi = packageDescription("rggobi", fields = c("Version")), ggobi = ggobi_version()$"version string" ) if (compareVersion(versions["ggobi"], "2.1.6") < 0) warning("Your GGobi is too old - please update to the latest version") # strip micro version and rev versions <- sub("\\.[^.]*$", "", sub("-.*", "", versions)) ver_comp <- compareVersion(versions["rggobi"], versions["ggobi"]) if (ver_comp != 0) { if (ver_comp < 0) versions <- rev(versions) warning("Your ", names(versions)[1], " version (", versions[1], ") is later than your ", names(versions)[2], " version (", versions[2], "). Please try to update your ", names(versions)[2], ".") } ver_comp == 0 } .onLoad <- function(libname, pkgname) { # library(methods) result <- try(library.dynam("rggobi", pkgname, libname)) if (inherits(result, "try-error")) stop("Could not load the rggobi library - please ensure GGobi is on the library path") ggobi_check_structs() .check_versions() TRUE } rggobi/R/ggobi.r0000644000176000001440000001507711772563330013247 0ustar ripleyusersggobi <- function(data=NULL, ...) UseMethod("ggobi", data) # New ggobi # Creates a new ggobi instance # # This function creates a new instance of GGobi with or without new data. Use # this function whenever you want to create a new GGobi indepdent of the # others---they will not share linked plots. If you want to add # another dataset to an existing ggobi, please see \code{\link{[<-.GGobi}} # # There are currently three basic types of functions that you # can use with rggobi: # # \itemize{ # \item Data getting and setting: see \code{\link{[.GGobi}}, and \code{\link{[.GGobiData}} # \item "Automatic" brushing: see \code{\link{glyph_colour}}, # \code{\link{glyph_size}}, \code{\link{glyph_type}}, # \code{\link{shadowed}}, \code{\link{excluded}}, and the associated # setter functions. # \item Edge modifcation: see \code{\link{edges}}, \code{\link{edges<-}}, # \code{\link{ggobi_longitudinal}} # } # # You will generally spend most of your time working with # \code{ggobdata}s, you retrieve using \code{\link{$.GGobiData}}, # \code{\link{[.GGobiData}}, or \code{\link{[[.GGobiData}}. # Most of the time these will operate like normal R datasets while # pointing to the data in GGobi so that all changes are kept in sync. # If you need to force a ggobiDaataset to be an R \code{data.frame} use # \code{\link{as.data.frame}}. # # @arguments the name of a file containing the data, or a data frame or matrix containing the values # @arguments a character vector of command-line arguments # @arguments data format GGobi should expect to read the data from, if reading from a file. # @arguments the name to use in GGobi for the dataset, if one is specified # @arguments ignored # @value A ggobi object # @keyword dynamic # @alias rggobi # @alias ggobi #X ggobi(ggobi_find_file("data", "flea.csv")) #X ggobi(ggobi_find_file("data", "flea.xml")) #X ggobi(mtcars) #X mtcarsg <- ggobi_get()$mtcars #X glyph_colour(mtcarsg) #X glyph_colour(mtcarsg) <- ifelse(mtcarsg$cyl < 4, 1, 2) #X glyph_size(mtcarsg) <- mtcarsg$cyl ggobi.default <- function(data, args=character(0), mode=character(0), name = deparse(sys.call()[[2]]), ...) { filename <- character(0) if(!missing(data) && is.character(data) && file.exists(data)) { filename <- path.expand(data) } args <- c(file.path(getwd(),"rggobi"), "--keepalive", as.character(args), as.character(mode), filename) ok <- .Call(.ggobi.symbol("init"), args, TRUE, PACKAGE = "rggobi") if(!is.null(ok) && !missing(data) && length(filename) == 0) { name <- force(name) ok[name] <- data } invisible(ok) } # GGobi names # Get dataset names # # @arguments ggobi instance # @keyword dynamic #X g <- ggobi(mtcars) #X names(g) names.GGobi <- function(x) { .GGobiCall("getDatasetNames", .gobi=x) } # Clean ggobi # Clean arguments for ggobi # # Arguments for ggobi need to be in specific format. # This function helps ensure that. # # @arguments vector # @keyword dynamic # @keyword internal clean.ggobi <- function(x) { if (is.numeric(x)) { as.integer(x) } else { as.character(x) } } # Print ggobi # Prints summary of ggobi object by instance # # @arguments ggobi object # @seealso \code{\link{summary.GGobi}} # @keyword dynamic # @keyword internal print.GGobi <- function(x, ...) { print(summary(x)) } # GGobi summary # Get a description of the global state of the GGobi session. # # @arguments ggobi object # @arguments ignored # @keyword dynamic #X g <- ggobi(mtcars) #X summary(g) summary.GGobi <- function(object, ...) { ans <- .GGobiCall("getDescription", .gobi = object) if (is.null(ans)) return("Nothing known about this GGobi instance") dimnames(ans$"Data dimensions") <- list(ans$Fileame, c("nrow", "ncol")) ans } # Close GGobi instance # Terminates and discards a ggobi instance # # This allows the caller to close a ggobi instance and discard the # resources it uses. The function closes the display windows and # variable panel window associated with this ggobi instance. # It also resets the default ggobi instance to be the last # one created. # # @arguments ggobi object to close # @arguments ignored and for compatability generic function. # @keyword dynamic #X g1 <- ggobi(mtcars) #X g2 <- ggobi(mtcars) #X close(g2) #X close(ggobi_get()) close.GGobi <- function(con, ...) { ok <- .GGobiCall("close", .gobi = con) invisible(ok) } # Get number of GGobis # Retrieves the number of ggobi instances within this session # # One or more ggobi instances can be created within an R session so that one # can simultaneously look at different datasets or have different views # of the same dataset. This function returns the number of ggobis in existence. # # The different ggobi instances are maintained as C level structures. # This function accesses a variable that stores how many are in existence # when the function is invoked. # # @keyword dynamic #X ggobi_count() ggobi_count <- function() { .GGobiC("getNumGGobiInstances", num = as.integer(-1), .gobi=NULL)$num } # Get GGobi # Returns a ggobi reference # # This allows one to get a list of all the ggobi instances currently # in existence in the R session. Also, one can fetch particular instances. # # @arguments numeric vector indicating which ggobi instances to retrieve. Use default if none specified # @arguments drop if possible? # @returns list of ggobi instances # @keyword dynamic #X ggobi(mtcars) #X ggobi(Nile) #X ggobi_get(1) #X ggobi_get(1:2) ggobi_get <- function(id = ggobi_count(), drop=TRUE) { ggobis <- .GGobiCall("getGGobi", as.integer(id), .gobi=NULL) if (drop && length(ggobis) == 1) return(ggobis[[1]]) ggobis } # Get version # GGobi version information # # Return an object that describes the version of the ggobi # library being used. This allows code to execute # conditionally on certain version numbers, etc. # # @value date the release date of the ggobi library # @value version a vector of 3 integers containing the major, minor and patch-level numbers. # @value versionstring a string version of the major, minor and patch-level numbers, # @keyword dynamic #X ggobi_version() ggobi_version <- function() { info <- .GGobiCall("getVersionInfo", .gobi=NULL) names(info) <- c("date", "version", "version string") names(info$version) <- c("major", "minor", "patch") info } # Find GGobi file. # Finds a file stored somewhere in the ggobi installation. # # @arguments bits of the path to join together # @keyword dynamic # @keyword internal #X ggobi_find_file("data","tips.xml") ggobi_find_file <- function(..., check = F) { file <- .GGobiCall("ggobi_find_data_file", file.path(...)) if(check && !file.exists(file)) stop("Cannot find file ", file) file }rggobi/R/plot.r0000644000176000001440000000170211772563330013124 0ustar ripleyusers # Set plot range # Set the range of a plot. # # Only applies to scatterplots. # # @keyword internal # @arguments GGobiDisplay object # @arguments plot number # @arguments x range # @arguments y range #X g <- ggobi(mtcars) #X d <- displays(g)[[1]] #X ggobi_display_set_plot_range(d, x=c(0, 40), y=c(0, 100)) # ggobi_display_set_plot_range <- function (gd, plot=1, x, y) { # x <- rep(x, length=2) # y <- rep(y, length=2) # # .GGobiCall("setPlotRange", as.numeric(x)[1], as.numeric(y)[1], as.numeric(x)[2], as.numeric(y)[2], gd, as.integer(plot)) # invisible() # } # Get plot range # Get plot range as list of X and Y ranges # # @keyword internal # @arguments GGobiDisplay object # @arguments plot number #X g <- ggobi(mtcars) #X d <- displays(g)[[1]] #X ggobi_display_get_plot_range(d) # ggobi_display_get_plot_range <- function (gd, plot=1) { # range <- .GGobiCall("getPlotRange", gd, as.integer(plot)) # names(range) <- c("x", "y") # range # } rggobi/R/gtk.r0000644000176000001440000000127611772563330012741 0ustar ripleyusers# RGtk casting # Cast an object to an RGtk object # # @keyword internal as.RGtkObject <- function(x) { class(x) <- c(class(x), "RGtkObject") x } # Gtk main window # Retrieve RGtk object for main window # # Useful for embedding in other applications or for listening # to their signals via RGtk2. # # @keyword internal ggobi_gtk_main_window <- function(.gobi = ggobi_get()) { .GGobiCall("getMainWindow", .gobi = .gobi) } # Gtk menu bar # Retrieve RGtk object for menu bar # # Useful for embedding in other applications or for listening # to their signals via RGtk2. # # @keyword internal ggobi_gtk_menu_bar <- function(.gobi = ggobi_get()) { .GGobiCall("getMenubar", .gobi = .gobi) } rggobi/R/display-modes.r0000644000176000001440000000516211772563330014724 0ustar ripleyusers# Projection mode # Functions to get and set projection mode # # In GGobi, the projection mode determines the type # of plot that is displayed. For example, a 1D ASH plot, # or a 2D tour. # # You can see the list of available projection modes # using the \code{\link{pmodes}} function. This accepts # either a GGobiDisplay, or the name of the display type. # # @arguments GGobiDisplay object # @keyword dynamic # @alias pmode<- #X g <- ggobi(mtcars) #X d <- displays(g)[[1]] #X pmode(d) #X pmodes(d) #X pmode(d) <- "1D Plot" pmode <- function(x) .GGobiCall("getPModeName", x) "pmode<-" <- function(x, value) { value <- match.arg(value, pmodes(x)) .GGobiCall("setPMode", as.character(value), x) x } # Interaction mode # Functions to get and set interaction mode # # In GGobi, the interaction mode determines the how # you interact with a plot: brushing, identify etc. # Each projection mode also has a default interaction # mode that allows you to select variables and control # other parameters of the display # # You can see the list of available interaction modes # using the \code{\link{imodes}} function. This accepts # either a GGobiDisplay, or the name of the display type. # # @arguments GGobiDisplay object # @keyword dynamic # @alias imode<- #X g <- ggobi(mtcars) #X d <- displays(g)[[1]] #X imode(d) #X imodes(d) #X imode(d) <- "Brush" imode <- function(x) .GGobiCall("getIModeName", x) "imode<-" <- function(x, value) { value <- match.arg(value, imodes(x)) .GGobiCall("setIMode", as.character(value), x) x } # List available projection/interaction modes # These generic methods retrieves possible projection/interaction modes. # # The default methods retrieve a list modes for all display types, # the character methods retrieve modes for a given display type, and # the GGobiDisplay methods return possible modes for a given display # # @alias imodes # @alias pmodes.default # @alias pmodes.GGobiDisplay # @alias imodes.GGobiDisplay # @alias pmodes.character # @alias imodes.character # @keyword internal pmodes <- function(x=NULL) UseMethod("pmodes", x) pmodes.default <- function(x) { types <- ggobi_display_types() modes <- lapply(types, pmodes) unlist(unname(mapply( function(modes, type) { all <- append(modes, type) lookup <- rep(type, length=length(all)) names(lookup) <- all lookup }, modes, names(modes), SIMPLIFY=FALSE ))) } pmodes.GGobiDisplay <- function(x) pmodes(class(x)[1]) pmodes.character <- function(x) .GGobiCall("getPModeNames", x) imodes <- function(x) UseMethod("imodes", x) imodes.GGobiDisplay <- function(x) imodes(class(x)[1]) imodes.character <- function(x) .GGobiCall("getIModeNames", x) rggobi/R/display.r0000644000176000001440000001152411777224622013621 0ustar ripleyusers# View displays # See methods for details # # @keyword internal displays <- function(x) UseMethod("displays", x) # Get GGobi displays # Gets list of displays in the specified GGobi instance # # A display basically corresponds to a window in GGobi. A display # may contain mutliple plots within it. For example, the scatterplot # matrix contains $p * p$ plots. # # Use this function to obtain a reference to a display (they are # numbered in the order they are created) so you can change # display mode, set variables (\code{\link{variables<-.GGobiDisplay}}), # or save a static image to disk. # # @seealso \code{\link{display}} to create displays # @alias displays.GGobi # @arguments GGobi object # @keyword dynamic #X g <- ggobi(mtcars) #X displays(g) #X display(g[1]) #X displays(g) displays.GGobi <- function(x) { .GGobiCall("getDisplays", .gobi = x) } # Get display dataset # Returns a link to the GGobiData (dataset) object associated with this display. # # See \code{\link{[.GGobi}} for more information on # # @arguments GGobiDisplay object # @arguments ggobi reference # @keyword manip #X g <- ggobi(mtcars) #X d <- displays(g)[[1]] #X dataset(d) dataset.GGobiDisplay <- function(x, .gobi=ggobi(x)) { .GGobiCall("getDisplayDataset", x, .gobi=.gobi) } # Get display GGobi # Returns a link to the GGobi object associated with this display # # @arguments GGobiDisplay object # @keyword internal ggobi.GGobiDisplay <- function(data, ...) { .GGobiCall("getGGobiForDisplay", data) } # Print method for GGobiDisplay # Shows display type (first element in class vector) # # @arguments GGobiDisplay object # @keyword internal print.GGobiDisplay <- function(x, ...) { print(class(x)[1]) } # Close display # Closes the referenced display. The R variable will be invalid after this call. # # @arguments GGobiDisplay object to close # @keyword internal #X g <- ggobi(mtcars) #X displays(g) #X close(displays(g)[[1]]) #X displays(g) close.GGobiDisplay <- function(con, ...) { .GGobiCall("closeDisplay", con) } # Length method for GGobiDisplay # Returns the number of plots within a given display # # @arguments GGobiDisplay object from which to retrieve the number of plots # @keyword internal length.GGobiDisplay <- function(x) { .GGobiCall("getNumPlotsInDisplay", x) } # Save picture of plot (and window) to disk # This allows you to make a static copy of a GGobiDisplay. # # If you want to make publicaiton quality graphics, you should # probably use the DescribeDisplay plugin and package. This # will recreate a GGobiDisplay in R, and so can produce high-quality # vector (eg. pdf) output. See \url{http://www.ggobi.org/describe-display} # for more information # # @arguments GGobiDisplay to save # @arguments path to save to # @arguments type of file to save # @arguments if TRUE, save only plot, otherwise save surrounding GUI elements as well # @keyword hplot #X g <- ggobi(mtcars) #X ggobi_display_save_picture(displays(g)[[1]], "test.png") ggobi_display_save_picture <- function(display=displays(ggobi_get())[[1]], path="ggobi_display.png", filetype="png", plot.only = FALSE) { display_widget <- .ggobi_display_get_widget(as.RGtkObject(display)) if (plot.only) { if (inherits(display, "GGobiScatmatDisplay")) display_widget <- display_widget[[2]][[1]] display_widget <- display_widget[[2]][[3]][["widget"]] } if (boundGTKVersion() >= "2.14.0") drawable <- display_widget$getSnapshot() else drawable <- display_widget[["window"]] widget_size <- drawable$getSize() pixbuf <- gdkPixbufGetFromDrawable(src = drawable, cmap = NULL, src.x = 0, src.y = 0, dest.x = 0, dest.y = 0, width = widget_size$width, height = widget_size$height) pixbuf$save(path, filetype) invisible(path) } .ggobi_display_get_widget <- function(display) { .GGobiCall("getDisplayWidget", display) } # ========================================================= # Class methods # ========================================================= # GGobiDisplay types # Get list of GGobiDisplay types. An instance of GGobi must be open # # @arguments GGobi reference # @seealso \code{\link{ggobi_display_make_type}} # @keyword internal ggobi_display_types <- function() { .GGobiCall("getDisplayTypes", .gobi = ggobi_get()) } # Convert plot name to GGobi plot type # Used to convert between friendly plot name and internal GGobi name. # # @keyword internal ggobi_display_make_type <- function(type) { if(!inherits(type, "GType")) { types <- ggobi_display_types() id <- match(type, names(types)) if(is.na(id)) { id <- match(type, sapply(types, pmodes)) } if(is.na(id)) stop("Unrecognized plot type") type <- types[[id]] } type } rggobi/R/longitudinal.r0000644000176000001440000000432611772574174014654 0ustar ripleyusers # Create longitudinal dataset. # Instantiate new ggobi with a longitudinal data set. # # This function allows you to load longitudinal data in # to GGobi and display it as a line plot. This is achieved # by creating edges between adjacent time points, for a given # id variable. # # For best viewing, we recommend that you turn the show points off # in the options menu. When brushing, you may also want to use # categorical brushing on the id variable, so that the entire # series is selected for an observation. # # @arguments data frame # @arguments time variable # @arguments id variable # @arguments ggobi instance, if you don't want to create a new one # @keyword dynamic #X data(Oxboys, package="nlme") #X ggobi_longitudinal(Oxboys, Occasion, Subject) #X ggobi_longitudinal(stormtracks, seasday, id) #X ggobi_longitudinal(data.frame(x=1:100, y=sin(1:100))) ggobi_longitudinal <- function(data, time=1:rows, id=rep(1, rows), g = NULL) { name <- deparse(substitute(data)) rows <- nrow(data) time <- eval(substitute(time), data) obsUnit <- eval(substitute(id), data) or <- order(obsUnit, time) tmp <- data[or, ] if (is.null(g)) { g <- ggobi(tmp, name=name) } else { g[name] <- tmp } edges <- cbind(rownames(tmp[-nrow(tmp), ]), rownames(tmp[-1, ])) matching <- obsUnit[or][-1] == obsUnit[or][-nrow(tmp)] edges[!matching, ] <- NA edges <- edges[complete.cases(edges),] d <- data.frame(tmp[edges[,1], sapply(tmp, is.factor), drop=FALSE]) rownames(d) <- paste(name, 1:nrow(d), sep="") g[paste(name, "edges", sep="-")] <- d edges(g[paste(name, "edges", sep="-")]) <- edges if (!is.null(ggobi)) { d <- displays(g)[[1]] edges(d) <- g[2] } invisible(g) } # Create parallel coordinates plot. # Mock up a pcp plot using points and edges. # # Experimental and may suggest ways to reduce PCP code in GGobi # # @keyword internal ggobi_pcp <- function(data, type="range") { if (!require(reshape)) stop("Must have reshape package installed") data$CASEID <- factor(1:nrow(data)) datam <- melt(rescaler(data, type=type), id = "CASEID") g <- ggobi_longitudinal(datam, id=CASEID) g$raw <- data d <- displays(g)[[1]] edges(d) <- g[1] variables(d) <- list(X="variable", Y="value") invisible(g) }rggobi/R/display-tour.r0000644000176000001440000000371311772563330014606 0ustar ripleyusers# Get tour projection # Get the tour projection from a GGobi tour. # # This function retrieves the current projection matrix # from a paused tour. (The tour must be paused so that R # can run commands). # # This can be used to record interesting projections of your # data for later analysis. # # @arguments GGobiDisplay object running tour # @keyword dynamic #X g <- ggobi(mtcars) #X d <- displays(g)[[1]] #X \dontrun{ #X pmode(d) <- "2D Tour" #X ggobi_display_get_tour_projection(d) #X variables(d) <- list(X=names(mtcars)) #X ggobi_display_get_tour_projection(d) #X MASS::eqscplot(as.matrix(mtcars) \%*\% ggobi_display_get_tour_projection(d)) #X } ggobi_display_get_tour_projection <- function(gd) { mat <- .GGobiCall("getTourProjection", gd, pmode(gd)) mat[,1:2] / mat[,3] } # Set tour projection # Set the tour projection from a GGobi tour. # # If you know the projection you would like to see # in the tour, you can use this function to set it. The # example illustrates setting the projection to show # the first two principle components. # # @arguments GGobiDisplay object running tour # @arguments tour projection # @keyword dynamic #X g <- ggobi(mtcars) #X d <- displays(g)[[1]] #X \dontrun{ #X pmode(d) <- "2D Tour" #X variables(d) <- list(X=names(mtcars)) #X ggobi_display_get_tour_projection(d) #X pc <- princomp(as.matrix(mtcars))$loadings[,1:2] #X ggobi_display_set_tour_projection(d, pc) #X pc <- princomp(as.matrix(mtcars), cor=T)$loadings #X ggobi_display_set_tour_projection(d, pc)[,1:2] #X } ggobi_display_set_tour_projection <- function(gd, value) { normal <- all(abs(colSums(value^2) - 1) < 1e-3) orthog <- all(abs(crossprod(value, value) - diag(ncol(value))) < 1e-3) if (!normal) stop("Matrix is not normal (column lengths do not equal 1)") if (!orthog) stop("Matrix is not orthogonal") scale <- .GGobiCall("getTourProjection", gd, pmode(gd))[,3] value <- value * scale invisible(.GGobiCall("setTourProjection", gd, pmode(gd), value)) }rggobi/CHANGELOG0000644000176000001440000000023211772563330012771 0ustar ripleyusers 2.1.4-5 --------- * ggobi_longitudinal now creates a separate dataset for the edges * fixed variables() indexing problems and added more examples. * rggobi/NEWS0000644000176000001440000000013411772563330012257 0ustar ripleyusersVersion 2.1.17 -------------- * Updated windows makefile to work with new version of ggobirggobi/load.r0000644000176000001440000000030711772563330012664 0ustar ripleyuserslibrary(rggobi) source.with.err <- function(path) { tryCatch(source(path), error = function(x) {print(path); print(x)}) } lapply(dir("~/ggobi/rggobi/R/", "\\.[Sr]$", full.name=T), source.with.err)rggobi/start.r0000644000176000001440000000007111772563330013100 0ustar ripleyuserssource("load.r") g <- ggobi(mtcars) d <- displays(g)[[1]]rggobi/configure.in0000644000176000001440000000073011772563330014073 0ustar ripleyusersdnl This just builds Rggobi assuming GGobi is already installed. AC_INIT(src/brush.c) AC_ARG_WITH(ggobi,Specify where ggobi pkgconfig file is located, GGOBI_ROOT=$withval) dnl Get the compiler flags. dnl If the GGOBI_ROOT contains a ggobi.pc, we reference that if ! test -z "${GGOBI_ROOT}"; then export PKG_CONFIG_PATH=${GGOBI_ROOT}:$PKG_CONFIG_PATH fi PKG_CHECK_MODULES(GGOBI, [ggobi >= 2.1.6]) AC_SUBST(GGOBI_CFLAGS) AC_SUBST(GGOBI_LIBS) AC_OUTPUT(src/Makevars) rggobi/NAMESPACE0000644000176000001440000000314411772563330013003 0ustar ripleyusersexportPattern("^[^\\.]") import(utils) import(RGtk2) S3method(print, GGobiData) S3method(dim, GGobiData) S3method(nrow, GGobiData) S3method(ncol, GGobiData) S3method(names, GGobiData) S3method("names<-", GGobiData) S3method(rownames, GGobiData) S3method("rownames<-", GGobiData) S3method(dimnames, GGobiData) S3method("dimnames<-", GGobiData) S3method(summary, GGobiData) S3method("[", GGobiData) S3method("$", GGobiData) S3method(as.data.frame, GGobiData) S3method("[<-", GGobiData) S3method("$<-", GGobiData) S3method("[", GGobi) S3method("[[", GGobi) S3method("$", GGobi) S3method(print, GGobi) S3method(names, GGobi) S3method(summary, GGobi) S3method(close, GGobi) S3method(print, GGobiDisplay) S3method(close, GGobiDisplay) S3method(length, GGobiDisplay) S3method("displays", GGobi) S3method("edges<-", GGobi) S3method("edges<-", GGobiData) S3method("pmodes", default) S3method("pmodes", GGobiDisplay) S3method("pmodes", character) S3method("imodes", GGobiDisplay) S3method("imodes", character) S3method("dataset", GGobiDisplay) S3method("display", GGobiData) S3method("variables", GGobiDisplay) S3method("variables<-", GGobiDisplay) S3method("ggobi", GGobiDisplay) S3method("ggobi", default) S3method("glyph_type", GGobiData) S3method("glyph_type<-", GGobiData) S3method("glyph_size", GGobiData) S3method("glyph_size<-", GGobiData) S3method("glyph_colour", GGobiData) S3method("glyph_colour<-", GGobiData) S3method("excluded", GGobiData) S3method("excluded<-", GGobiData) S3method("selected", GGobiData) S3method("shadowed", GGobiData) S3method("shadowed<-", GGobiData) S3method("ids", GGobiData) S3method("ids<-", GGobiData) rggobi/src/0000755000176000001440000000000011777244105012352 5ustar ripleyusersrggobi/src/display.c0000644000176000001440000003262211777244105014170 0ustar ripleyusers#include "RSGGobi.h" #include "RUtils.h" #include #include "vars.h" USER_OBJECT_ RS_GGOBI(createDisplay)(USER_OBJECT_ stype, USER_OBJECT_ svars, USER_OBJECT_ datasetId, USER_OBJECT_ useWindow) { GGobiData *d; ggobid *gg; displayd *display = NULL; GType type; GGobiExtendedDisplayClass *klass; gboolean use_window = asCLogical(useWindow); d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; type = g_type_from_name(asCString(stype)); klass = GGOBI_EXTENDED_DISPLAY_CLASS(g_type_class_peek(type)); if(!klass) { PROBLEM "Unrecognized display type" ERROR; } if(klass->createWithVars && GET_LENGTH(svars)) { gint nvars, *vars, i; nvars = GET_LENGTH(svars); vars = g_malloc(sizeof(gint)*nvars); for(i = 0; i < nvars; i++) vars[i] = INTEGER_DATA(svars)[i]; display = klass->createWithVars(use_window, false, nvars, vars, d, gg); } else if(klass->create) display = klass->create(use_window, false, NULL, d, gg); if(!display) { PROBLEM "Couldn't create the display" ERROR; } display_add(display, gg); gdk_flush(); return(RS_displayInstance(display)); } /** This is called when we have reset all the variables in the different splots within a display. The intent is that this will recompute everything, including the positions of the points/glyphs. Currently this is not doing that. Need to call some other method. */ USER_OBJECT_ RS_GGOBI(updateDisplay)(USER_OBJECT_ dpy, USER_OBJECT_ ggobiId) { USER_OBJECT_ ans = NEW_LOGICAL(1); ggobid *gg; displayd *display; gg = toGGobi(ggobiId); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); display = toDisplay(dpy); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); display_tailpipe(display, FULL, gg); LOGICAL_DATA(ans)[0] = TRUE; return(ans); } /* Ideally the GGobi would be a property of the display, allowing access with RGtk2, but this is not so... */ USER_OBJECT_ RS_GGOBI(getGGobiForDisplay)(USER_OBJECT_ s_display) { displayd *display = toDisplay(s_display); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); return RS_ggobiInstance(display->ggobi); } /* Returns the number of splotd objects contained within a a given displayd object. */ USER_OBJECT_ RS_GGOBI(getNumPlotsInDisplay)(USER_OBJECT_ dpy) { displayd *display; gint len; USER_OBJECT_ ans = NEW_INTEGER(1); display = toDisplay(dpy); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); len = g_list_length(display->splots); INTEGER_DATA(ans)[0] = len; return(ans); } USER_OBJECT_ RS_GGOBI(getDisplayOptions)(USER_OBJECT_ which) { USER_OBJECT_ ans, names; gint NumOptions = 8; DisplayOptions *options; if (GET_LENGTH(which) == 0) options = GGOBI(getDefaultDisplayOptions)(); else { displayd *display = toDisplay(which); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); options = &(display->options); } g_return_val_if_fail(options != NULL, NULL_USER_OBJECT); PROTECT(ans = NEW_LOGICAL(NumOptions)); PROTECT(names = NEW_CHARACTER(NumOptions)); LOGICAL_DATA(ans)[DOPT_POINTS] = options->points_show_p; SET_STRING_ELT(names, DOPT_POINTS, COPY_TO_USER_STRING("Show points")); LOGICAL_DATA(ans)[DOPT_AXES] = options->axes_show_p; SET_STRING_ELT(names, DOPT_AXES, COPY_TO_USER_STRING("Show axes")); LOGICAL_DATA(ans)[DOPT_AXESLAB] = options->axes_label_p; SET_STRING_ELT(names, DOPT_AXESLAB, COPY_TO_USER_STRING("Show tour axes")); LOGICAL_DATA(ans)[DOPT_AXESVALS] = options->axes_values_p; SET_STRING_ELT(names, DOPT_AXESVALS, COPY_TO_USER_STRING("Show axes labels")); LOGICAL_DATA(ans)[DOPT_EDGES_U] = options->edges_undirected_show_p; SET_STRING_ELT(names, DOPT_EDGES_U, COPY_TO_USER_STRING("Undirected edges")); LOGICAL_DATA(ans)[DOPT_EDGES_A] = options->edges_arrowheads_show_p; SET_STRING_ELT(names, DOPT_EDGES_A, COPY_TO_USER_STRING("Arrowheads")); LOGICAL_DATA(ans)[DOPT_EDGES_D] = options->edges_directed_show_p; SET_STRING_ELT(names, DOPT_EDGES_D, COPY_TO_USER_STRING("Directed edges")); LOGICAL_DATA(ans)[DOPT_WHISKERS] = options->whiskers_show_p; SET_STRING_ELT(names, DOPT_WHISKERS, COPY_TO_USER_STRING("Show whiskers")); /* unused LOGICAL_DATA(ans)[5] = options->missings_show_p; SET_STRING_ELT(names, 5, COPY_TO_USER_STRING("Missing Values")); LOGICAL_DATA(ans)[8] = options->axes_center_p; SET_STRING_ELT(names, 8, COPY_TO_USER_STRING("Center axes")); LOGICAL_DATA(ans)[9] = options->double_buffer_p; SET_STRING_ELT(names, 9, COPY_TO_USER_STRING("Double buffer")); LOGICAL_DATA(ans)[10] = options->link_p; SET_STRING_ELT(names, 10, COPY_TO_USER_STRING("Link")); */ SET_NAMES(ans, names); UNPROTECT(2); return(ans); } /* */ USER_OBJECT_ RS_GGOBI(setDisplayOptions)(USER_OBJECT_ which, USER_OBJECT_ values) { gint i; DisplayOptions *options; displayd *display = NULL; int apply = 0; g_return_val_if_fail(GET_LENGTH(values) == 8, NULL_USER_OBJECT); if(GET_LENGTH(which) == 0) { options = GGOBI(getDefaultDisplayOptions)(); } else { display = toDisplay(which); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); options = &(display->options); g_return_val_if_fail(options != NULL, NULL_USER_OBJECT); apply = 1; } i = 0; options->points_show_p = LOGICAL_DATA(values)[i++]; options->axes_show_p = LOGICAL_DATA(values)[i++]; options->axes_label_p = LOGICAL_DATA(values)[i++]; options->axes_values_p = LOGICAL_DATA(values)[i++]; options->edges_undirected_show_p = LOGICAL_DATA(values)[i++]; options->edges_arrowheads_show_p = LOGICAL_DATA(values)[i++]; options->edges_directed_show_p = LOGICAL_DATA(values)[i++]; options->whiskers_show_p = LOGICAL_DATA(values)[i++]; /* unused options->missings_show_p = LOGICAL_DATA(values)[i++]; options->axes_center_p = LOGICAL_DATA(values)[i++]; options->double_buffer_p = LOGICAL_DATA(values)[i++]; options->link_p = LOGICAL_DATA(values)[i++]; */ if(apply) { set_display_options(display, display->ggobi); } return (NULL_USER_OBJECT); } static void toggle_display_variables(displayd *display, USER_OBJECT_ vars, gboolean active) { gint i, j; for (j = 0; j < 3; j++) { USER_OBJECT_ varIds = VECTOR_ELT(vars, j); for (i = 0; i < GET_LENGTH(varIds); i++) { gint var = INTEGER_DATA(varIds)[i]; GtkWidget *wid = varpanel_widget_get_nth(j, var, display->d); if (!GTK_IS_WIDGET(wid)) error("Unknown variable"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wid)) == active) { varsel(wid, &display->cpanel, display->current_splot, var, j, -1, 0, 0, 0, display->d, display->ggobi); } } } } USER_OBJECT_ RS_GGOBI(getDisplayVariables)(USER_OBJECT_ dpy) { USER_OBJECT_ buttons, vars, ans; static gchar *button_names[] = { "X", "Y", "Z" }; gint i; displayd *display = toDisplay(dpy); /* get the currently plotted variables */ gint *plotted_vars = g_new (gint, display->d->ncols); gint nplotted_vars = GGOBI_EXTENDED_DISPLAY_GET_CLASS (display)->plotted_vars_get( display, plotted_vars, display->d, display->ggobi); PROTECT(ans = NEW_LIST(2)); buttons = NEW_CHARACTER(nplotted_vars); SET_VECTOR_ELT(ans, 1, buttons); vars = NEW_INTEGER(nplotted_vars); SET_VECTOR_ELT(ans, 0, vars); for (i = 0; i < nplotted_vars; i++) { gint var = plotted_vars[i], j; for (j = 0; j < G_N_ELEMENTS(button_names); j++) { GtkWidget *wid = varpanel_widget_get_nth(j, var, display->d); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wid))) SET_STRING_ELT(buttons, i, mkChar(button_names[j])); } INTEGER_DATA(vars)[i] = var; } UNPROTECT(1); g_free(plotted_vars); return(ans); } /* Allows the R user to set the variables within a given display */ USER_OBJECT_ RS_GGOBI(setDisplayVariables)(USER_OBJECT_ vars, USER_OBJECT_ varPrev, USER_OBJECT_ dpy) { displayd *display, *prev_display; USER_OBJECT_ ans = NULL_USER_OBJECT; display = toDisplay(dpy); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); /* ensure that display is current before changing variables */ prev_display = display->ggobi->current_display; display_set_current(display, display->ggobi); /* If any of the requested variables AREN'T selected, select them */ toggle_display_variables(display, vars, false); varpanel_refresh(display, display->ggobi); /* If any of the obsolete variables ARE still selected, select (toggle) them */ toggle_display_variables(display, varPrev, true); /* refresh everything */ varpanel_refresh(display, display->ggobi); display_tailpipe(display, FULL, display->ggobi); while(gtk_events_pending()) /* ensure display is redrawn */ gtk_main_iteration(); /* revert to previously selected display */ display_set_current(prev_display, prev_display->ggobi); return(ans); } USER_OBJECT_ RS_GGOBI(getDisplayDataset)(USER_OBJECT_ dpy) { displayd * display; USER_OBJECT_ ans; display = toDisplay(dpy); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); ans = RS_datasetInstance(display->d); return(ans); } USER_OBJECT_ RS_axesValueMatrix(displayd *display) { /* currently only works for Tour2D */ int n = display->t2d.nsubset, k, j; vartabled *vt; USER_OBJECT_ matrix; PROTECT(matrix = allocMatrix(REALSXP, n, 4)); for (k = 0; k < n; k++) { j = display->t2d.subset_vars.els[k]; vt = vartable_element_get (j, display->d); REAL(matrix)[k] = display->t2d.F.vals[0][j]; /* x coeff */ REAL(matrix)[k+n] = display->t2d.F.vals[1][j]; /* y coeff */ REAL(matrix)[k+2*n] = vt->lim.max - vt->lim.min; /* range */ REAL(matrix)[k+3*n] = j+1; /* variable index */ } UNPROTECT(1); return(matrix); } void RS_INTERNAL_GGOBI(getTourVectorsFromMode)(displayd *display, ProjectionMode mode, gdouble **x, gdouble **y) { tour *t; switch(mode) { case TOUR1D: t = &display->t1d; break; case TOUR2D: t = &display->t2d; break; case TOUR2D3: t = &display->t2d3; break; case COTOUR: t = &display->tcorr1; break; default: g_critical("Specified mode '%s' is not a tour", GGOBI(getPModeName)(mode)); return; } *x = t->F.vals[0]; *y = NULL; if (mode == COTOUR) *y = display->tcorr2.F.vals[0]; else if (mode != TOUR1D) *y = t->F.vals[1]; } /* Expects a 2 column matrix with the X and Y coefficients for each var */ USER_OBJECT_ RS_GGOBI(setTourProjection)(USER_OBJECT_ s_display, USER_OBJECT_ s_mode_name, USER_OBJECT_ matrix) { displayd *display = toDisplay(s_display); ProjectionMode mode = GGOBI(getPModeId)(asCString(s_mode_name)); gint k, n; gdouble *x = NULL, *y = NULL; g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); RS_INTERNAL_GGOBI(getTourVectorsFromMode)(display, mode, &x, &y); g_return_val_if_fail(x != NULL, NULL_USER_OBJECT); n = display->d->ncols; for (k = 0; k < n; k++) { x[k] = REAL(matrix)[k]; if (y) y[k] = REAL(matrix)[k+n]; } display_tailpipe (display, FULL, display->ggobi); varcircles_refresh (display->d, display->ggobi); return NULL_USER_OBJECT; } USER_OBJECT_ RS_GGOBI(getTourProjection)(USER_OBJECT_ s_display, USER_OBJECT_ s_mode_name) { displayd *display = toDisplay(s_display); ProjectionMode mode = GGOBI(getPModeId)(asCString(s_mode_name)); gint k, n; USER_OBJECT_ matrix; gdouble *x = NULL, *y = NULL; g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); RS_INTERNAL_GGOBI(getTourVectorsFromMode)(display, mode, &x, &y); g_return_val_if_fail(x != NULL, NULL_USER_OBJECT); n = display->d->ncols; PROTECT(matrix = allocMatrix(REALSXP, n, 3)); for (k = 0; k < n; k++) { vartabled *vt = vartable_element_get (k, display->d); REAL(matrix)[k] = x[k]; /* x coeff */ if (y) REAL(matrix)[k+n] = y[k]; /* y coeff */ else REAL(matrix)[k+n] = 0; REAL(matrix)[k+2*n] = vt->lim.max - vt->lim.min; /* range */ } UNPROTECT(1); return matrix; } USER_OBJECT_ RS_GGOBI(getDisplayWidget)(USER_OBJECT_ r_display) { displayd *display = (displayd *) toDisplay(r_display); GtkWidget *widget = GTK_WIDGET(display); if (GGOBI_IS_WINDOW_DISPLAY(display) && GGOBI_WINDOW_DISPLAY(display)->useWindow) widget = gtk_bin_get_child(GTK_BIN(GGOBI_WINDOW_DISPLAY(display)->window)); return toRPointer(widget, "GtkWidget"); } USER_OBJECT_ RS_displayInstance(displayd *display) { USER_OBJECT_ ans; ans = toRPointer(display, "GGobiDisplay"); return(ans); } USER_OBJECT_ RS_GGOBI(closeDisplay)(USER_OBJECT_ ref, USER_OBJECT_ ggobiId) { ggobid *gg = toGGobi(ggobiId); USER_OBJECT_ ans = NEW_LOGICAL(1); displayd *display; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(!gg) return(ans); display = (displayd *) R_ExternalPtrAddr(ref); display = ValidateDisplayRef(display, gg, false); if(display) { display_free(display, true, gg); LOGICAL_DATA(ans)[0] = TRUE; gdk_flush(); } return(ans); } displayd * toDisplay(USER_OBJECT_ rdisplay) { if(inherits(rdisplay, "GGobiDisplay")) { displayd *display = getPtrValue(rdisplay); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL); g_return_val_if_fail(ValidateGGobiRef(display->ggobi, false) != NULL, NULL); return(ValidateDisplayRef(display, display->ggobi, false)); } g_critical("An R GGobi display object must inherit from class 'GGobiDisplay'"); return(NULL); } rggobi/src/print.c0000644000176000001440000000356511777244105013663 0ustar ripleyusers#include "RSGGobi.h" #include "print.h" PrintOptions *RSggobi_directPrintHandler(PrintOptions *options, displayd *dpy, ggobid *gg, GGobiPrintHandler *printHandler); USER_OBJECT_ RSGggobi_convertPrintOptions(PrintOptions *opts); USER_OBJECT_ RSggobi_setPrintHandler(USER_OBJECT_ func) { extern void R_PreserveObject(SEXP); DefaultPrintHandler.callback = RSggobi_directPrintHandler; R_PreserveObject(func); DefaultPrintHandler.userData = (void *)func; return(NULL_USER_OBJECT); } PrintOptions * RSggobi_directPrintHandler(PrintOptions *options, displayd *dpy, ggobid *gg, GGobiPrintHandler *printHandler) { SEXP e, opts; PROTECT(e = allocVector(LANGSXP, 3)); SETCAR(e, printHandler->userData); opts = RS_displayInstance(dpy); SETCAR(CDR(e), opts); opts = RSGggobi_convertPrintOptions(options); SETCAR(CDR(CDR(e)), opts); (void) eval(e, R_GlobalEnv); UNPROTECT(1); return(options); } USER_OBJECT_ RSGggobi_convertPrintOptions(PrintOptions *options) { int numSlots = 0; USER_OBJECT_ ans, snames, tmp; char *names[] = {"dims", "fileName", "colors"}; enum { PRINT_DIMS, PRINT_FILENAME, PRINT_COLORS}; numSlots = sizeof(names)/sizeof(names[0]); PROTECT(ans = NEW_LIST(numSlots)); PROTECT(snames = NEW_CHARACTER(numSlots)); SET_VECTOR_ELT(ans, PRINT_DIMS, tmp = NEW_INTEGER(2)); INTEGER_DATA(tmp)[0] = options->width; INTEGER_DATA(tmp)[1] = options->height; SET_STRING_ELT(snames, PRINT_DIMS, COPY_TO_USER_STRING(names[PRINT_DIMS])); SET_VECTOR_ELT(ans, PRINT_FILENAME, tmp = NEW_CHARACTER(1)); SET_STRING_ELT(tmp, 0, COPY_TO_USER_STRING(options->file->fileName)); SET_STRING_ELT(snames, PRINT_DIMS, COPY_TO_USER_STRING(names[PRINT_FILENAME])); SET_NAMES(ans, snames); PROTECT(tmp = NEW_CHARACTER(1)); SET_STRING_ELT(tmp, 0, COPY_TO_USER_STRING("ggobiPrintOptions")); SET_CLASS(ans, tmp); UNPROTECT(3); return(ans); } rggobi/src/dataset.c0000644000176000001440000005327311777244105014155 0ustar ripleyusers#include "RSGGobi.h" USER_OBJECT_ RS_datasetInstance(GGobiData *d) { USER_OBJECT_ ans; ans = toRPointer(d, "GGobiData"); return(ans); } GGobiData * toData(USER_OBJECT_ d) { if(inherits(d, "GGobiData")) { GGobiData *data = getPtrValue(d); g_return_val_if_fail(GGOBI_IS_DATA(data), NULL); g_return_val_if_fail(ValidateGGobiRef(data->gg, false) != NULL, NULL); return(ValidateDatadRef(data, data->gg, false)); } g_critical("An R GGobi dataset object must inherit from GGobiData"); return(NULL); } USER_OBJECT_ RS_GGOBI(getVariableNames)(USER_OBJECT_ transformed, USER_OBJECT_ datasetId) { GGobiData *d = NULL; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); if(d) return(RS_INTERNAL_GGOBI(getVariableNames)(d)); else return(NULL_USER_OBJECT); } USER_OBJECT_ RS_INTERNAL_GGOBI(getVariableNames)(GGobiData *d) { USER_OBJECT_ ans; gint n, i; n = d->ncols; PROTECT(ans = NEW_CHARACTER(n)); for (i = 0; i < n ; i++) { SET_STRING_ELT(ans, i, COPY_TO_USER_STRING(ggobi_data_get_col_name(d, i))); } UNPROTECT(1); return(ans); } USER_OBJECT_ RS_GGOBI(getCaseIds)(USER_OBJECT_ datasetId) { GGobiData *d; USER_OBJECT_ ans; int n, m; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); if(!d) { PROBLEM "No such dataset" ERROR; } if(!d->rowIds) { return(NULL_USER_OBJECT); } n = d->nrows; PROTECT(ans = NEW_CHARACTER(n)); for(m = 0; m < n ; m++) { if(d->rowIds[m]) SET_STRING_ELT(ans, m, COPY_TO_USER_STRING(d->rowIds[m])); } UNPROTECT(1); return(ans); } /* returns selected indices, labeled by rownames */ USER_OBJECT_ RS_GGOBI(getSelectedIndices)(USER_OBJECT_ datasetId) { GGobiData *d; USER_OBJECT_ ans, names; d = toData(datasetId); if(d) { gint nr, i, m, ctr; gchar *name; nr = d->npts_under_brush; if (nr < 1) return(NULL_USER_OBJECT); PROTECT(ans = NEW_INTEGER(nr)); PROTECT(names = NEW_CHARACTER(nr)); ctr = 0; for(m = 0 ; m < d->nrows ; m++) { i = d->rows_in_plot.els[m]; if (d->pts_under_brush.els[i]) { INTEGER_DATA(ans)[ctr] = i + 1; /* Make these 1 based */ name = (gchar *) g_array_index (d->rowlab, gchar *, i); if(name && name[0]) SET_STRING_ELT(names, ctr, COPY_TO_USER_STRING (name)); ctr++; } } SET_NAMES(ans, names); UNPROTECT(2); } else ans = NULL_USER_OBJECT; return (ans); } USER_OBJECT_ RS_GGOBI(getRowNames)(USER_OBJECT_ data) { USER_OBJECT_ ans = NULL_USER_OBJECT; gint nr, m; GGobiData *d; d = toData(data); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); if(d) { nr = d->nrows; PROTECT(ans = NEW_CHARACTER(nr)); for (m = 0 ; m < nr ; m++) { SET_STRING_ELT(ans, m, COPY_TO_USER_STRING(g_array_index (d->rowlab, gchar *, m))); } UNPROTECT(1); } return (ans); } USER_OBJECT_ RS_GGOBI(getRowsInPlot)(USER_OBJECT_ datasetId) { USER_OBJECT_ ans = NULL_USER_OBJECT; GGobiData *d; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); if(d) { gint i; PROTECT(ans = NEW_INTEGER(d->nrows_in_plot)); for(i = 0; i < d->nrows_in_plot ; i++) { INTEGER_DATA(ans)[i] = d->rows_in_plot.els[i]; } UNPROTECT(1); } return (ans); } /* shouldn't these be internal? */ USER_OBJECT_ RS_INTERNAL_GGOBI(getDataAttribute)(vector_b v) { USER_OBJECT_ ans = NULL_USER_OBJECT; gint i; PROTECT(ans = NEW_LOGICAL(v.nels)); for(i = 0; i < v.nels; i++) { LOGICAL_DATA(ans)[i] = v.els[i]; } UNPROTECT(1); return (ans); } void RS_INTERNAL_GGOBI(setDataAttribute)(vector_b *v, USER_OBJECT_ vals, GGobiData *d) { if(v) { gint i, n; n = GET_LENGTH(vals); if(n != d->nrows) { PROBLEM "number of values must be the same as the number of records in the GGobi dataset" ERROR; } vectorb_realloc(v, n); for(i = 0; i < n; i++) { v->els[i] = LOGICAL_DATA(vals)[i]; } } } USER_OBJECT_ RS_GGOBI(getSampledIndices)(USER_OBJECT_ datasetId) { GGobiData *d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); return(RS_INTERNAL_GGOBI(getDataAttribute)(d->sampled)); } USER_OBJECT_ RS_GGOBI(setSampledIndices)(USER_OBJECT_ vals, USER_OBJECT_ datasetId) { GGobiData *d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); RS_INTERNAL_GGOBI(setDataAttribute)(&(d->sampled), vals, d); rows_in_plot_set(d, d->gg); return(NULL_USER_OBJECT); } USER_OBJECT_ RS_GGOBI(getExcludedIndices)(USER_OBJECT_ datasetId) { GGobiData *d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); return(RS_INTERNAL_GGOBI(getDataAttribute)(d->excluded)); } USER_OBJECT_ RS_GGOBI(setExcludedIndices)(USER_OBJECT_ vals, USER_OBJECT_ datasetId) { GGobiData *d = toData(datasetId); ggobid *gg = d->gg; g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); RS_INTERNAL_GGOBI(setDataAttribute)(&(d->excluded), vals, d); subset_apply(d, gg); GGOBI(update_data)(d, gg); displays_tailpipe (FULL, gg); return(NULL_USER_OBJECT); } USER_OBJECT_ RS_GGOBI(setCasesHidden)(USER_OBJECT_ vals, USER_OBJECT_ which, USER_OBJECT_ datasetId) { gint i; ggobid *gg; GGobiData *d; USER_OBJECT_ ans = NEW_LOGICAL(1); d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; if(d) { int num = GET_LENGTH(vals); for (i = 0; i < num; i++) { GGOBI(setCaseHidden)(INTEGER_DATA(which)[i], LOGICAL_DATA(vals)[i], d, gg); } displays_plot (NULL, FULL, gg); gdk_flush(); LOGICAL_DATA(ans)[0] = TRUE; } return(ans); } USER_OBJECT_ RS_GGOBI(getCasesHidden)(USER_OBJECT_ datasetId) { USER_OBJECT_ ans = NULL_USER_OBJECT; ggobid *gg; GGobiData *d; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; if(d) { gint num = d->nrows, m; PROTECT(ans = NEW_LOGICAL(num)); for(m = 0; m < num; m++) { LOGICAL_DATA(ans)[m] = GGOBI(getCaseHidden)(m, d, gg); } UNPROTECT(1); } return(ans); } /* This allows us to add a variable to the existing dataset. If there are no variables currently in the dataset, the first one added will induce a call to GGOBI(setData) and datad_init() which will create the relevant tab in the notebook. However, it will also slight mess up with the addition of the variables into the control panel (e.g. create X, Y and Z buttons for no good reason.) We might want to inhibit this and wait until the end. */ USER_OBJECT_ RS_GGOBI(addVariable)(USER_OBJECT_ vals, USER_OBJECT_ name, USER_OBJECT_ levels, USER_OBJECT_ values, USER_OBJECT_ datasetId) { GGobiData *d; ggobid *gg; USER_OBJECT_ ans = NULL_USER_OBJECT; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; if(d) { int i; PROTECT(ans = NEW_INTEGER(1)); if(GET_LENGTH(levels)) { USER_OBJECT_ names; int n = GET_LENGTH(levels); char **levelValues; names = GET_NAMES(levels); levelValues = (char **) S_alloc(n, sizeof(char *)); for(i = 0; i < n ; i++) { levelValues[i] = (char *)CHAR_DEREF(STRING_ELT(names, i)); } INTEGER_DATA(ans)[0] = GGOBI(addCategoricalVariable)(NUMERIC_DATA(vals), GET_LENGTH(vals), (char *)CHAR_DEREF(STRING_ELT(name,0)), levelValues, INTEGER_DATA(values), INTEGER_DATA(levels), n, true, d, gg); } else { INTEGER_DATA(ans)[0] = GGOBI(addVariable)(NUMERIC_DATA(vals), GET_LENGTH(vals), (char *)CHAR_DEREF(STRING_ELT(name,0)), true, d, gg); } UNPROTECT(1); } else { PROBLEM "Cannot resolve dataset in GGobi" ERROR; } return(ans); } USER_OBJECT_ RS_GGOBI(datad_init)(USER_OBJECT_ cleanup, USER_OBJECT_ datasetId) { GGobiData *d; ggobid *gg; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; if(d) { datad_init(d, gg, LOGICAL_DATA(cleanup)[0]); } return(NULL_USER_OBJECT); } USER_OBJECT_ RS_GGOBI(setVariableValues)(USER_OBJECT_ vals, USER_OBJECT_ rowIds, USER_OBJECT_ colId, USER_OBJECT_ update, USER_OBJECT_ datasetId) { ggobid *gg; GGobiData *d; gint i, num, var, row; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; num = GET_LENGTH(rowIds); var = INTEGER_DATA(colId)[0]; for (i=0;i < num; i++) { row = INTEGER_DATA(rowIds)[i]; d->raw.vals[row][var] = d->tform.vals[row][var] = NUMERIC_DATA(vals)[i]; } /* splot_reverse_pipeline (gg->current_splot, row, &gg->movepts.eps, true, true, gg); */ /* * This call does too much. Need to find a routine that does * just what is needed. pipeline_init (d, gg); displays_plot(NULL, FULL, gg); */ if(LOGICAL_DATA(update)[0]) { tform_to_world (d, gg); displays_tailpipe (FULL, gg); gdk_flush(); } return(NULL_USER_OBJECT); } USER_OBJECT_ RS_GGOBI(setVariableNames)(USER_OBJECT_ vars, USER_OBJECT_ names, USER_OBJECT_ datasetId) { gint i, which; ggobid *gg; GGobiData *d; int num = GET_LENGTH(vars); gchar **curNames; USER_OBJECT_ ans; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; PROTECT(ans = NEW_CHARACTER(num)); curNames = GGOBI(getVariableNames)(false, d, gg); for (i = 0; i < num; i++) { which = INTEGER_DATA(vars)[i]; SET_STRING_ELT(ans, i, COPY_TO_USER_STRING(curNames[which])); GGOBI(setVariableName)(which, (char *)CHAR_DEREF(STRING_ELT(names,i)), false, d, gg); GGOBI(setVariableName)(which, (char *)CHAR_DEREF(STRING_ELT(names,i)), true, d, gg); } UNPROTECT(1); return(ans); } USER_OBJECT_ RS_GGOBI(varpanel_populate)(USER_OBJECT_ datasetId) { GGobiData *d; ggobid *gg; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; if(d) { varpanel_populate(d, gg); } return(NULL_USER_OBJECT); } USER_OBJECT_ RS_GGOBI(getVariable)(int which, GGobiData *d) { int nr = d->nrows_in_plot, i, m; float f; USER_OBJECT_ ans; vartabled *vt; vt = vartable_element_get (which, d); if(vt->vartype == categorical) { PROTECT(ans = NEW_INTEGER(nr)); } else { PROTECT(ans = NEW_NUMERIC(nr)); } for(m = 0; m < nr; m++) { i = d->rows_in_plot.els[m]; f = d->raw.vals[i][which]; if(vt->vartype == categorical) INTEGER_DATA(ans)[m] = f; else NUMERIC_DATA(ans)[m] = f; } if(vt->vartype == categorical) { USER_OBJECT_ levs; nr = vt->nlevels; PROTECT(levs = NEW_CHARACTER(nr)); for(m = 0; m < nr; m++) { gchar* tmp; i = d->rows_in_plot.els[m]; tmp = (gchar *) vt->level_names[i]; SET_STRING_ELT(levs, m, COPY_TO_USER_STRING(tmp)); } SET_LEVELS(ans, levs); PROTECT(levs = NEW_CHARACTER(1)); SET_STRING_ELT(levs, 0, COPY_TO_USER_STRING("factor")); SET_CLASS(ans, levs); UNPROTECT(2); } UNPROTECT(1); return(ans); } USER_OBJECT_ RS_GGOBI(getVariables)(USER_OBJECT_ which, USER_OBJECT_ datasetId) { GGobiData *d = NULL; USER_OBJECT_ ans = NULL_USER_OBJECT; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); if(d) { int n = GET_LENGTH(which), i; PROTECT(ans = NEW_LIST(n)); for(i = 0; i < n; i++) { SET_VECTOR_ELT(ans, i, RS_GGOBI(getVariable)(INTEGER_DATA(which)[i]-1, d)); } UNPROTECT(1); } else { PROBLEM "Cannot identify dataset in GGobi" ERROR; } return(ans); } USER_OBJECT_ RS_GGOBI(createEmptyData)(USER_OBJECT_ snrow, USER_OBJECT_ name, USER_OBJECT_ description, USER_OBJECT_ gobiId) { ggobid *gg = toGGobi(gobiId); GGobiData *d; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if((gg = ValidateGGobiRef(gg, false)) == NULL) { return(R_NilValue); } d = ggobi_data_new(INTEGER_DATA(snrow)[0], 0); if(!d) { PROBLEM "Can't create GGobi dataste" ERROR; } GGobi_setDataName(CHAR_DEREF(STRING_ELT(name, 0)), d); if(!d->input) d->input = g_malloc(sizeof(InputDescription)); d->input->fileName = g_strdup(CHAR_DEREF(STRING_ELT(description, 0))); pipeline_init(d, gg); rows_in_plot_set (d, gg); return(RS_datasetInstance(d)); } /* Set the names of rows/observations identified by the elements of the indices array which should be between 0 and nrows - 1. */ USER_OBJECT_ RS_GGOBI(setRowNames)(USER_OBJECT_ names, USER_OBJECT_ indices, USER_OBJECT_ datasetId) { GGobiData *d; gchar *tmp, *lbl; gint i; USER_OBJECT_ ans = NULL_USER_OBJECT; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); if(d) { gboolean getOldValues = true; int num = GET_LENGTH(names); int which; if(!d->rowlab->data) { rowlabels_alloc(d); getOldValues = false; } if(getOldValues) PROTECT(ans = NEW_CHARACTER(num)); for(i = 0; i < num; i++) { which = INTEGER_DATA(indices)[i]; if(getOldValues) { tmp = (gchar *) g_array_index (d->rowlab, gchar *, which); /* Copy and free the old value! Currently not freeing this. Bad things happen. Need to find out what the g_array_index and insert_val are doing with memory management! */ if(tmp && tmp[0]) { SET_STRING_ELT(ans, i, COPY_TO_USER_STRING(tmp)); /* g_free(tmp); */ tmp = NULL; } } lbl = g_strdup(CHAR_DEREF(STRING_ELT(names, i))); g_array_insert_val (d->rowlab, which, lbl); } if(getOldValues) UNPROTECT(1); } return(ans); } /* Sets the IDs in a dataset - by mikel */ void RS_GGOBI(setIDs)(USER_OBJECT_ ids, USER_OBJECT_ datasetId) { GGobiData *d; gchar **g_ids; int n, i; d = toData(datasetId); g_return_if_fail(GGOBI_IS_DATA(d)); if(d) { n = GET_LENGTH(ids); g_ids = (gchar **) S_alloc(n , sizeof(gchar*)); for(i = 0; i < n ; i++) g_ids[i] = (char *)CHAR_DEREF(STRING_ELT(ids, i)); datad_record_ids_set(d, g_ids, true); } } /* The C-side of R's setData.. appends datasets */ USER_OBJECT_ RS_GGOBI(addData)(USER_OBJECT_ values, USER_OBJECT_ rowNames, USER_OBJECT_ colNames, USER_OBJECT_ dims, USER_OBJECT_ description, USER_OBJECT_ name, USER_OBJECT_ ids, USER_OBJECT_ gobiID ) { InputDescription *desc; ggobid *gg = toGGobi(gobiID); GGobiData *d = NULL; gint i, j; USER_OBJECT_ num; gchar *logical_levels[] = { "FALSE", "TRUE" }; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); desc = g_new0(InputDescription, 1); desc->fileName = g_strdup(asCString(description)); desc->mode = Sprocess_data; d = ggobi_data_new(INTEGER_DATA(dims)[0], INTEGER_DATA(dims)[1]); ggobi_data_set_name(d, (char *)asCString(name), NULL); ggobi_data_set_row_labels(d, asCStringArray(rowNames)); datad_record_ids_set(d, asCStringArray(ids), true); /* ids MUST be given */ for (i = 0; i < GET_LENGTH(values); i++) { USER_OBJECT_ vector = VECTOR_ELT(values, i); vartabled *vt = vartable_element_get(i, d); ggobi_data_set_col_name(d, i, (char *)asCString(STRING_ELT(colNames, i))); if (TYPEOF(vector) == INTSXP) { if (isFactor(vector)) { USER_OBJECT_ levels = getAttrib(vector, install("levels")); vartable_element_categorical_init(vt, GET_LENGTH(levels), asCStringArray(levels), NULL, NULL); } for (j = 0; j < INTEGER_DATA(dims)[0]; j++) ggobi_data_set_raw_value(d, j, i, (gdouble)INTEGER_DATA(vector)[j]); } else if (IS_NUMERIC(vector)) ggobi_data_set_raw_values(d, i, NUMERIC_DATA(vector)); else if (IS_LOGICAL(vector)) { vartable_element_categorical_init(vt, 2, logical_levels, NULL, NULL); for (j = 0; j < INTEGER_DATA(dims)[0]; j++) ggobi_data_set_raw_value(d, j, i, (gdouble)LOGICAL_DATA(vector)[j]); } else g_critical("Unknown R data type in column %d", i); } gg->input = desc; datad_init (d, gg, false); num = NEW_INTEGER(1); INTEGER_DATA(num)[0] = g_slist_length(gg->d); gdk_flush(); return(num); } USER_OBJECT_ RS_GGOBI(setDataName)(USER_OBJECT_ name, USER_OBJECT_ datasetId) { GGobiData *d; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); GGobi_setDataName(CHAR_DEREF(STRING_ELT(name, 0)), d); return(NULL_USER_OBJECT); } /*-------------------------------------------------------------------------*/ /* glyphs */ /*-------------------------------------------------------------------------*/ USER_OBJECT_ RS_GGOBI(setCaseGlyphs)(USER_OBJECT_ vals, USER_OBJECT_ sizes, USER_OBJECT_ which, USER_OBJECT_ datasetId) { ggobid *gg; GGobiData *d; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; if(d) { gint i, id; int num = GET_LENGTH(which); for(i = 0; i < num; i++) { id = INTEGER_DATA(which)[i]; GGOBI(setCaseGlyph)(id, INTEGER_DATA(vals)[i], INTEGER_DATA(sizes)[i], d, gg); } clusters_set (d, gg); cluster_table_update (d, gg); /* dfs, May 20 2005 */ displays_plot(NULL, FULL, gg); gdk_flush(); } return(NULL_USER_OBJECT); } USER_OBJECT_ RS_GGOBI(getCaseGlyphs)(USER_OBJECT_ ids, USER_OBJECT_ datasetID) { USER_OBJECT_ ans, types, sizes, names; gint i, id, n; gboolean all = true; ggobid *gg; GGobiData *d; d = toData(datasetID); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); if(!d) return(NULL_USER_OBJECT); gg = d->gg; if(GET_LENGTH(ids) > 0) { n = GET_LENGTH(ids); all = false; } else n = d->nrows; PROTECT(types = NEW_INTEGER(n)); PROTECT(sizes = NEW_INTEGER(n)); PROTECT(names = NEW_CHARACTER(n)); for(i = 0; i < n; i++) { gchar const *typeName; int type; if(all) { id = i; } else { id = INTEGER_DATA(ids)[i]; } /* Don't convert to names. */ INTEGER_DATA(types)[i] = type = GGOBI(getCaseGlyphType)(id, d, gg); typeName = GGOBI(getGlyphTypeName)(type); SET_STRING_ELT(names, i, COPY_TO_USER_STRING(typeName)); INTEGER_DATA(sizes)[i] = GGOBI(getCaseGlyphSize)(id, d, gg); } SET_NAMES(types, names); PROTECT(ans = NEW_LIST(2)); SET_VECTOR_ELT(ans, 0, types); SET_VECTOR_ELT(ans, 1, sizes); PROTECT(names = NEW_CHARACTER(2)); SET_STRING_ELT(names, 0, COPY_TO_USER_STRING("type")); SET_STRING_ELT(names, 1, COPY_TO_USER_STRING("size")); SET_NAMES(ans, names); UNPROTECT(5); return(ans); } USER_OBJECT_ RS_GGOBI(setCaseColors)(USER_OBJECT_ vals, USER_OBJECT_ which, USER_OBJECT_ datasetId) { gint i, id; USER_OBJECT_ ans = NULL_USER_OBJECT; gint num = GET_LENGTH(which); ggobid *gg; GGobiData *d; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; if(d) { for(i = 0; i < num; i++) { id = INTEGER_DATA(which)[i]; GGOBI(setCaseColor)(id, INTEGER_DATA(vals)[i] - 1, d, gg); } clusters_set (d, gg); /* reactivated, May 20 2005 */ cluster_table_update (d, gg); /* added, May 20 2005 -- dfs */ displays_plot(NULL, FULL, gg); gdk_flush(); } return(ans); } USER_OBJECT_ RS_GGOBI(getCaseColors)(USER_OBJECT_ ids, USER_OBJECT_ datasetId) { USER_OBJECT_ colors, names; gint i, id, n, color; gboolean all = true; const gchar *colorName; ggobid *gg; GGobiData *d; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; if(GET_LENGTH(ids) > 0) { n = GET_LENGTH(ids); all = false; } else n = d->nrows; PROTECT(colors = NEW_INTEGER(n)); PROTECT(names = NEW_CHARACTER(n)); for(i = 0; i < n; i++) { if(all) { id = i; } else { id = INTEGER_DATA(ids)[i]; } /* Don't convert to names. */ INTEGER_DATA(colors)[i] = color = GGOBI(getCaseColor)(id, d, gg); colorName = GGOBI(getColorName)(color, gg, true); if(colorName && colorName[0]) SET_STRING_ELT(names, i, COPY_TO_USER_STRING(colorName)); } SET_NAMES(colors, names); UNPROTECT(2); return(colors); } USER_OBJECT_ RS_GGOBI(setVariableTypes)(USER_OBJECT_ vars, USER_OBJECT_ values, USER_OBJECT_ datasetId) { gint i, which; ggobid *gg; GGobiData *d; int num; USER_OBJECT_ ans; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; num = GET_LENGTH(vars); PROTECT(ans = NEW_INTEGER(num)); for (i = 0; i < num; i++) { which = INTEGER_DATA(vars)[i]; } UNPROTECT(1); return(ans); } /* Get the source name associated with the specified GGobiData In the case of loading an R data frame, for example, this returns a string like 'data.frame(data)'. If the data originated from a file, then the name of that file is returned. */ USER_OBJECT_ RS_GGOBI(getSourceName)(USER_OBJECT_ datasetId) { ggobid *gg; USER_OBJECT_ ans = NULL_USER_OBJECT; GGobiData *d; if(GET_LENGTH(datasetId)) { d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; PROTECT(ans = NEW_CHARACTER(1)); if(GGOBI(getFileName)(gg)) SET_STRING_ELT(ans, 0, COPY_TO_USER_STRING(GGOBI(getFileName)(gg))); UNPROTECT(1); } return(ans); } USER_OBJECT_ RS_GGOBI(datasetDim)(USER_OBJECT_ data) { USER_OBJECT_ ans = NULL_USER_OBJECT; GGobiData *d; d = toData(data); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); if(d) { ans = NEW_INTEGER(2); INTEGER_DATA(ans)[0] = GGOBI(nrecords)(d); INTEGER_DATA(ans)[1] = GGOBI(ncols)(d); } return(ans); } rggobi/src/keyHandlers.c0000644000176000001440000000556611777244105015003 0ustar ripleyusers#include "RSGGobi.h" #include #include #include "RSEval.h" /* Takes care of registering, unregistering and invoking handlers for key press events from ggobi for the numbered keys (i.e. 0, ..., 9) */ gboolean RS_GGOBI(GenericKeyPressHandler)(guint keyval, GtkWidget *w, GdkEventKey *event, cpaneld *cpanel, splotd *sp, ggobid *gg, void *userData); USER_OBJECT_ RS_INTERNAL_GGOBI(createRSGdkEvent)(GdkEventKey *event); USER_OBJECT_ RS_GGOBI(setNumberedKeyHandler)(USER_OBJECT_ handler, USER_OBJECT_ sdescription, USER_OBJECT_ ggobiId) { extern void R_PreserveObject(USER_OBJECT_); ggobid *gg = toGGobi(ggobiId); USER_OBJECT_ ans = NULL_USER_OBJECT; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(GET_LENGTH(handler)) { const char *description = CHAR_DEREF(STRING_ELT(sdescription, 0)); R_PreserveObject(handler); GGOBI(registerNumberedKeyEventHandler)(RS_GGOBI(GenericKeyPressHandler), handler, (char *)description, NULL, gg, R); } else { KeyEventHandler *old = GGOBI(removeNumberedKeyEventHandler)(gg); g_free(old->description); g_free(old); } return(ans); } #define NUM_HANDLER_ARGS 4 /* The invocation handler function within the handler object must be last. */ gboolean RS_GGOBI(GenericKeyPressHandler)(guint keyval, GtkWidget *w, GdkEventKey *event, cpaneld *cpanel, splotd *sp, ggobid *gg, void *userData) { USER_OBJECT_ myHandler; USER_OBJECT_ skey, argList, fun; myHandler = (USER_OBJECT_) userData; PROTECT(argList = NEW_LIST(NUM_HANDLER_ARGS)); SET_VECTOR_ELT(argList, 0, skey = NEW_INTEGER(1)); INTEGER_DATA(skey)[0] = keyval - GDK_0; SET_VECTOR_ELT(argList, 2, RS_ggobiInstance(gg)); SET_VECTOR_ELT(argList, 3, toRPointer(event, "GdkEventKey")); fun = VECTOR_ELT(myHandler, GET_LENGTH(myHandler)-1); RS_GGOBI(callFunctionWithArgs)(fun, argList); UNPROTECT(1); return(true); } /* USER_OBJECT_ RS_INTERNAL_GGOBI(createRSGdkEvent)(GdkEventKey *event) { USER_OBJECT_ ans, klassName; PROTECT(ans = NEW_NUMERIC(1)); NUMERIC_DATA(ans)[0] = (double) (long) event; PROTECT(klassName = NEW_CHARACTER(1)); SET_STRING_ELT(klassName, 0, COPY_TO_USER_STRING("GdkEventKey")); SET_CLASS(ans, klassName); UNPROTECT(2); return(ans); } */ USER_OBJECT_ RS_GGOBI(getNumberedKeyHandler)(USER_OBJECT_ ggobiId) { USER_OBJECT_ ans = NULL_USER_OBJECT; ggobid *gg = toGGobi(ggobiId); KeyEventHandler *h; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(gg == NULL) { PROBLEM "Error in accessing a ggobi instance" ERROR; } h = gg->NumberedKeyEventHandler; if(h == NULL) return(ans); if(h->language == R) { ans = (USER_OBJECT_) h->userData; } else { PROBLEM "The register key handler is not an R handler. Cannot currently handle this!" ERROR; } return(ans); } rggobi/src/io.c0000644000176000001440000000230311777244105013123 0ustar ripleyusers#include "RSGGobi.h" #include extern XmlWriteInfo *updateXmlWriteInfo(GGobiData *d, ggobid *gg, XmlWriteInfo *info); USER_OBJECT_ RS_GGOBI(writeDatasetsXML)(USER_OBJECT_ datasetIds, USER_OBJECT_ filename) { FILE *f; XmlWriteInfo info = {0, }; GGobiData *d; ggobid *gg; gint i = 0; g_return_val_if_fail(GET_LENGTH(datasetIds) > 0, NULL_USER_OBJECT); /* we take the ggobid from the first dataset */ /* i don't know what would happen if you had datasets from different ggobis */ /* we shouldn't even need a ggobi here, but ggobi is not perfect (yet) */ d = toData(VECTOR_ELT(datasetIds, i)); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); f = fopen(CHAR_DEREF(STRING_ELT(filename, 0)), "w"); gg->save.edges_p = TRUE; info.useDefault = TRUE; write_xml_header(f, -1, gg, &info); for (i = 0; i < GET_LENGTH(datasetIds); i++) { d = toData(VECTOR_ELT(datasetIds, i)); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); updateXmlWriteInfo(d, gg, &info); write_xml_dataset(f, d, gg, &info); } write_xml_footer(f, gg, &info); fclose(f); return(NULL_USER_OBJECT); } rggobi/src/longitudinal.c0000644000176000001440000000074011777244105015210 0ustar ripleyusers#include "RSGGobi.h" USER_OBJECT_ RS_GGOBI(setAsTimeVariables)(USER_OBJECT_ vars, USER_OBJECT_ values, USER_OBJECT_ datasetId) { gint i, which; ggobid *gg; GGobiData *d; int num; USER_OBJECT_ ans; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; num = GET_LENGTH(vars); PROTECT(ans = NEW_LOGICAL(num)); for (i = 0; i < num; i++) { which = INTEGER_DATA(vars)[i]; } UNPROTECT(1); return(ans); } rggobi/src/ui.c0000644000176000001440000000406211777244105013135 0ustar ripleyusers#include "RSGGobi.h" /** This returns a raw pointer to the Gtk window object associated with the given display, which is given as an S object of class GGobiDisplay. */ USER_OBJECT_ RS_GGOBI(getDisplayWindow)(USER_OBJECT_ display) { displayd *dpy; dpy = (displayd*) R_ExternalPtrAddr((VECTOR_ELT(display, 1))); if(!dpy || GGOBI_IS_WINDOW_DISPLAY(dpy) == false) return(NULL_USER_OBJECT); return(toRPointer(GGOBI_WINDOW_DISPLAY(dpy)->window, "GtkWindow")); } /** Extracts a list of the splotd objects from the given displayd given as an S object of class GGobiDisplay. This returns the splotd objects as simple external pointers and does not put a class on them. */ USER_OBJECT_ RS_GGOBI(getDisplayPlotWidgets)(USER_OBJECT_ display) { displayd *dpy; int n; GList *tmp; USER_OBJECT_ els; #if 1 dpy = R_ExternalPtrAddr(VECTOR_ELT(display, 1)); #else dpy = (displayd*) (long) NUMERIC_DATA(VECTOR_ELT(display, 1))[0]; #endif n = g_list_length(dpy->splots); PROTECT(els = NEW_LIST(n)); tmp = dpy->splots; n = 0; while(tmp) { USER_OBJECT_ p; splotd *sp = (splotd *) tmp->data; p = toRPointer(sp->da, "GtkWidget"); SET_VECTOR_ELT(els, n++, p); tmp = tmp->next; } UNPROTECT(1); return(els); } USER_OBJECT_ RS_GGOBI(getMainMenubar)(USER_OBJECT_ gobi) { ggobid *gg = toGGobi(gobi); USER_OBJECT_ ans = NULL_USER_OBJECT; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(gg) ans = toRPointer(gg->main_menubar, "GtkWidget"); return(ans); } USER_OBJECT_ RS_GGOBI(getDisplayMenubar)(USER_OBJECT_ display, USER_OBJECT_ gobiId) { displayd *dpy = toDisplay(display); USER_OBJECT_ ans = NULL_USER_OBJECT; g_return_val_if_fail(GGOBI_IS_DISPLAY(dpy), NULL_USER_OBJECT); ans = toRPointer(dpy->menubar, "GtkWidget"); return(ans); } USER_OBJECT_ RS_GGOBI(getMainWindow)(USER_OBJECT_ gobiId) { ggobid *gg = toGGobi(gobiId); USER_OBJECT_ ans; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); ans = toRPointer(gg->main_window, "GtkWindow"); return(ans); } rggobi/src/conversion.c0000644000176000001440000000746611777244105014720 0ustar ripleyusers#include "conversion.h" #include char ** asCStringArray(USER_OBJECT_ svec) { char **els = NULL; int i, n; n = GET_LENGTH(svec); if(n > 0) { els = (char **) R_alloc(n+1, sizeof(char*)); for(i = 0; i < n; i++) { els[i] = (char *)CHAR_DEREF(STRING_ELT(svec, i)); } els[n] = NULL; } return(els); } gboolean asCLogical(USER_OBJECT_ s_log) { if (GET_LENGTH(s_log) == 0) return(FALSE); return(LOGICAL_DATA(s_log)[0]); } int asCInteger(USER_OBJECT_ s_int) { if (GET_LENGTH(s_int) == 0) return(0); return(INTEGER_DATA(s_int)[0]); } guchar asCRaw(USER_OBJECT_ s_raw) { if (GET_LENGTH(s_raw) == 0) return(0); return(RAW(s_raw)[0]); } double asCNumeric(USER_OBJECT_ s_num) { if (GET_LENGTH(s_num) == 0) return(0); return(NUMERIC_DATA(s_num)[0]); } /* This function takes a STRSXP or CHARSXP to a C string */ const char * asCString(USER_OBJECT_ s_str) { if (IS_VECTOR(s_str)) { if (GET_LENGTH(s_str) == 0) return(NULL); s_str = STRING_ELT(s_str, 0); } return(CHAR_DEREF(s_str)); /*return(CHAR_DEREF(STRING_ELT(s_str, 0)));*/ } char asCCharacter(USER_OBJECT_ s_char) { return(asCString(s_char)[0]); } USER_OBJECT_ asRLogical(Rboolean val) { USER_OBJECT_ ans; ans = NEW_LOGICAL(1); LOGICAL_DATA(ans)[0] = val; return(ans); } USER_OBJECT_ asRRaw(guchar val) { USER_OBJECT_ ans; ans = NEW_RAW(1); RAW(ans)[0] = val; return(ans); } USER_OBJECT_ asRInteger(int val) { USER_OBJECT_ ans; ans = NEW_INTEGER(1); INTEGER_DATA(ans)[0] = val; return(ans); } USER_OBJECT_ asRNumeric(double val) { USER_OBJECT_ ans; ans = NEW_NUMERIC(1); NUMERIC_DATA(ans)[0] = val; return(ans); } USER_OBJECT_ asRCharacter(char c) { char str[] = { c, '\0' }; return(asRString(str)); } USER_OBJECT_ asRString(const char *val) { USER_OBJECT_ ans; if (!val) return(NULL_USER_OBJECT); PROTECT(ans = NEW_CHARACTER(1)); if(val) SET_STRING_ELT(ans, 0, COPY_TO_USER_STRING(val)); UNPROTECT(1); return(ans); } void * getPtrValue(USER_OBJECT_ sval) { if(sval == NULL_USER_OBJECT) return(NULL); return(R_ExternalPtrAddr(sval)); } USER_OBJECT_ R_internal_getGTypeHierarchy(GType type) { USER_OBJECT_ ans; int n = 0; GType orig = type; while(type != 0 && type != G_TYPE_INVALID) { type = g_type_parent(type); n++; } PROTECT(ans = NEW_CHARACTER(n)); n = 0; type = orig; while(type != G_TYPE_INVALID) { const char *val; val = g_type_name(type); SET_STRING_ELT(ans, n, COPY_TO_USER_STRING(val)); n++; type = g_type_parent(type); } UNPROTECT(1); return(ans); } USER_OBJECT_ R_internal_getInterfaces(GType type) { SEXP list; GType *interfaces; guint n, i; interfaces = g_type_interfaces(type, &n); PROTECT(list = NEW_CHARACTER(n)); for(i = 0; i < n; i++) SET_STRING_ELT(list, i, COPY_TO_USER_STRING(g_type_name(interfaces[i]))); g_free(interfaces); UNPROTECT(1); return(list); } USER_OBJECT_ toRPointer(void *val, const char *typeName) { USER_OBJECT_ ans, klass = NULL; GType type = 0; if(val == NULL) return(NULL_USER_OBJECT); PROTECT(ans = R_MakeExternalPtr(val, Rf_install(typeName), NULL_USER_OBJECT)); if (typeName) type = g_type_from_name(typeName); if(type) { if (G_TYPE_IS_INSTANTIATABLE(type) || G_TYPE_IS_INTERFACE(type)) type = G_TYPE_FROM_INSTANCE(val); if (G_TYPE_IS_DERIVED(type)) { setAttrib(ans, install("interfaces"), R_internal_getInterfaces(type)); PROTECT(klass = R_internal_getGTypeHierarchy(type)); } } if (!klass && typeName) { PROTECT(klass = asRString(typeName)); } if(klass) { SET_CLASS(ans, klass); UNPROTECT(1); } UNPROTECT(1); return(ans); } rggobi/src/init.c0000644000176000001440000000520511777244105013463 0ustar ripleyusers#include "RSGGobi.h" #include "GGobiAPI.h" #include #define CENTRY(a, n) {#a, (DL_FUNC) &RS_GGOBI(a), n} static R_CMethodDef cmethods[] = { CENTRY(getNumGGobiInstances, 1), CENTRY(flush, 0) , {NULL} }; static R_CallMethodDef callMethods[] = { CENTRY(init, 2), CENTRY(getBrushColor, 0), CENTRY(setBrushColor, 1), CENTRY(getBrushGlyph, 0), CENTRY(setBrushGlyph, 1), CENTRY(setBrushSize, 2), CENTRY(setBrushLocation, 2), CENTRY(getColorSchemes, 0), CENTRY(addColorScheme, 4), CENTRY(getActiveColorScheme, 1), CENTRY(setActiveColorScheme, 2), CENTRY(setEdges, 5), CENTRY(getVariables, 3), CENTRY(getData, 2), CENTRY(setFile, 4), CENTRY(getNumDatasets, 1), CENTRY(varpanel_populate, 2), CENTRY(getDisplayDataset, 2), CENTRY(getDataset, 2), CENTRY(getCurrentDisplayType, 1), CENTRY(getDisplayOptions, 2), CENTRY(setDisplayOptions, 3), CENTRY(getActivePlot, 1), CENTRY(setActivePlot, 2), CENTRY(closeDisplay, 2), CENTRY(getDatasetNames, 1), CENTRY(getDescription, 1), CENTRY(getVariableNames, 3), CENTRY(getCaseGlyphs, 3), CENTRY(setCaseGlyphs, 5), CENTRY(getCaseColors, 3), CENTRY(setCaseColors, 4), /* CENTRY(setMissing), */ CENTRY(close, 1), CENTRY(isValid, 1), CENTRY(setIMode, 2), CENTRY(setPMode, 2), CENTRY(getPModeName, 1), CENTRY(getIModeName, 1), CENTRY(getCasesHidden, 2), CENTRY(setCasesHidden, 4), CENTRY(getMainMenubar, 1), CENTRY(getDisplayMenubar, 2), #if 0 CENTRY(setPlotRange), CENTRY(getPlotRange), #endif CENTRY(getSymbolicEdges, 2), CENTRY(getConnectedEdges, 3), CENTRY(createEdgeDataset, 3), CENTRY(setDisplayEdges, 5), CENTRY(raiseOrLowerDisplays, 4), CENTRY(getCurrentDisplay, 1), CENTRY(getMainWindow, 1), CENTRY(setVariableNames, 4), CENTRY(setVariableValues, 6), CENTRY(addVariable, 6), /* CENTRY(getPlugins, 1), CENTRY(getPluginInfo, 1),*/ CENTRY(getExcludedIndices, 2), CENTRY(setExcludedIndices, 3), CENTRY(getSampledIndices, 2), CENTRY(setSampledIndices, 3), CENTRY(getRowsInPlot, 2), CENTRY(getRowNames, 2), CENTRY(setRowNames, 4), CENTRY(getDisplayTypes, 0), CENTRY(getNumPlotsInDisplay, 2), CENTRY(getNumDisplays, 1), CENTRY(getNumberedKeyHandler, 1), CENTRY(setNumberedKeyHandler, 3), CENTRY(setVariableTypes, 4), CENTRY(setAsTimeVariables, 4), CENTRY(getPModeNames, 1), CENTRY(getIModeNames, 1) , {NULL} }; void R_init_Rggobi(DllInfo *dll) { g_debug("Registering symbols"); R_registerRoutines(dll, cmethods, callMethods, NULL, NULL); R_useDynamicSymbols(dll, TRUE); } rggobi/src/plot.c0000644000176000001440000000635111777244105013501 0ustar ripleyusers#include "RSGGobi.h" #include "RUtils.h" #include #include "vars.h" #include "parcoordsClass.h" #include "scatmatClass.h" #include "scatterplotClass.h" #include "tsdisplay.h" #include "barchartDisplay.h" greal RS_INTERNAL_GGOBI(tformToWorld)(GGobiData *d, gint j, greal min, greal max) { vartabled *var = vartable_element_get(j, d); gdouble var_min = var->lim.min, var_max = var->lim.max; gdouble mid = (max - min) / 2.0 + min; greal ftmp; ftmp = -1.0 + 2.0 * ((greal) mid - var_min) / (var_max - var_min); return (greal) (PRECISION1 * ftmp); } void RS_INTERNAL_GGOBI(getPlotRange)(displayd *display, splotd *sp, fcoords *tfmin, fcoords *tfmax) { icoords scr; cpaneld *cpanel; cpanel = &display->cpanel; if (display->hrule == NULL) return; tfmin->x = tfmin->y = tfmax->x = tfmax->y = 0.0; scr.x = scr.y = 0; GGOBI_EXTENDED_SPLOT_GET_CLASS (sp)->screen_to_tform (cpanel, sp, &scr, tfmin, display->ggobi); scr.x = sp->max.x; scr.y = sp->max.y; GGOBI_EXTENDED_SPLOT_GET_CLASS (sp)->screen_to_tform (cpanel, sp, &scr, tfmax, display->ggobi); } USER_OBJECT_ RS_GGOBI(setPlotRange)(USER_OBJECT_ s_min_x, USER_OBJECT_ s_min_y, USER_OBJECT_ s_max_x, USER_OBJECT_ s_max_y, USER_OBJECT_ rdisplay, USER_OBJECT_ plot) { displayd *display; USER_OBJECT_ ans; fcoords tfmin, tfmax; splotd *sp; greal min_x = NUMERIC_DATA(s_min_x)[0], min_y = NUMERIC_DATA(s_min_y)[0]; greal max_x = NUMERIC_DATA(s_max_x)[0], max_y = NUMERIC_DATA(s_max_y)[0]; greal scale_x, scale_y; display = toDisplay(rdisplay); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); g_return_val_if_fail(pmode_get(display, display->ggobi) == XYPLOT, NULL_USER_OBJECT); sp = GGOBI(getPlot)(display, INTEGER_DATA(plot)[0]-1); g_return_val_if_fail(GGOBI_IS_SPLOT(sp), NULL_USER_OBJECT); RS_INTERNAL_GGOBI(getPlotRange)(display, sp, &tfmin, &tfmax); sp->pmid.x = RS_INTERNAL_GGOBI(tformToWorld)(display->d, sp->xyvars.x, min_x, max_x); sp->pmid.y = RS_INTERNAL_GGOBI(tformToWorld)(display->d, sp->xyvars.y, min_y, max_y); scale_x = sp->scale.x * (max_x - min_x) / (tfmax.x - tfmin.x); scale_y = sp->scale.y * (max_y - min_y) / (tfmax.y - tfmin.y); splot_zoom(sp, scale_x, scale_y); ans = NEW_LOGICAL(1); LOGICAL_DATA(ans)[0] = TRUE; return(ans); } USER_OBJECT_ RS_GGOBI(getPlotRange)(USER_OBJECT_ rdisplay, USER_OBJECT_ plot) { /* This returns a list of two vectors, one for the X min/max and one for the Y */ displayd *display; splotd *sp; USER_OBJECT_ ans, s_x, s_y; fcoords tfmin, tfmax; display = toDisplay(rdisplay); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); g_return_val_if_fail(pmode_get(display, display->ggobi) == XYPLOT, NULL_USER_OBJECT); sp = GGOBI(getPlot)(display, INTEGER_DATA(plot)[0]-1); g_return_val_if_fail(GGOBI_IS_SPLOT(sp), NULL_USER_OBJECT); RS_INTERNAL_GGOBI(getPlotRange)(display, sp, &tfmin, &tfmax); PROTECT(ans = NEW_LIST(2)); s_x = NEW_NUMERIC(2); SET_VECTOR_ELT(ans, 0, s_x); s_y = NEW_NUMERIC(2); SET_VECTOR_ELT(ans, 1, s_y); NUMERIC_DATA(s_x)[0] = tfmin.x; NUMERIC_DATA(s_x)[1] = tfmax.x; NUMERIC_DATA(s_y)[0] = tfmax.y; NUMERIC_DATA(s_y)[1] = tfmin.y; UNPROTECT(1); return ans; } rggobi/src/Makevars.win.in0000644000176000001440000000016711772563330015252 0ustar ripleyusersPKG_CFLAGS=-mms-bitfields PKG_CPPFLAGS=-DUSE_EXT_PTR=1 -D_R_=1 -I../inst/include @GGOBI_CFLAGS@ PKG_LIBS=@GGOBI_LIBS@ rggobi/src/utils.c0000644000176000001440000000252311777244105013660 0ustar ripleyusers#include "RUtils.h" #include "RSGGobi.h" #include "vars.h" int R_IS(USER_OBJECT_ obj, const char * const name) { int i, n; USER_OBJECT_ className; className = getAttrib(obj, R_ClassSymbol); n = GET_LENGTH(className); for(i=0;inlevels)); PROTECT(labels = NEW_CHARACTER(vt->nlevels)); for(i = 0; i < vt->nlevels; i++) { INTEGER_DATA(levels)[i] = vt->level_values[i]; if (vt->level_names[i]) SET_STRING_ELT(labels, i, COPY_TO_USER_STRING(vt->level_names[i])); } PROTECT(e = allocVector(LANGSXP, 4)); SETCAR(e, Rf_install("factor")); SETCAR(CDR(e), vals); SETCAR(CDR(CDR(e)), levels); SETCAR(CDR(CDR(CDR(e))), labels); ans = eval(e, R_GlobalEnv); UNPROTECT(3); return(ans); } rggobi/src/Makevars.in0000644000176000001440000000011711772563330014451 0ustar ripleyusers PKG_CPPFLAGS=-g -DUSE_EXT_PTR=1 -D_R_=1 @GGOBI_CFLAGS@ PKG_LIBS=@GGOBI_LIBS@ rggobi/src/ggobi.c0000644000176000001440000001346211777244105013613 0ustar ripleyusers#include "RSGGobi.h" #include "RUtils.h" #ifndef G_OS_WIN32 #include #include "R_ext/eventloop.h" #include #else #include /*static void __cdecl GtkEventThreadHandler(void *display);*/ void R_gtk_handle_events(); extern void (*R_gtkdo)(); extern __declspec(dllimport) void (*R_tcldo)(); #endif #include "R_ext/RS.h" /*XXX used to be R_IsNaNorNA, but no longer available for us. R_finite() excludes infinite values also. This is probably okay for now. */ int isMissingValue(double d) { return(!R_finite(d) || d == R_NaInt); } static void log_handler(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) { if (log_level & (G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL)) error(message); else if (log_level & G_LOG_LEVEL_WARNING) warning(message); } static void registerErrorHandlers() { g_log_set_handler("Gtk", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, log_handler, NULL); g_log_set_handler("Gdk", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, log_handler, NULL); g_log_set_handler("Pango", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, log_handler, NULL); g_log_set_handler("GLib-GObject", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, log_handler, NULL); g_log_set_handler("GLib", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, log_handler, NULL); g_log_set_handler(NULL, (G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION) & ~G_LOG_LEVEL_DEBUG, log_handler, NULL); } /* Create a ggobi instance and initialize. */ USER_OBJECT_ RS_GGOBI(init)(USER_OBJECT_ args, USER_OBJECT_ createInstance) { gint which, i; char **c_args; int n = GET_LENGTH(args); USER_OBJECT_ ans; c_args = g_malloc(sizeof(char *)*n); for(i = 0; i < n ; i++) { c_args[i] = (char *)CHAR_DEREF(STRING_ELT(args, i)); } if(LOGICAL_DATA(createInstance)[0]) { ggobid *gg; which = GGOBI(main)(n, c_args, false); gg = ggobi_get(which-1); gtk_action_set_visible(gtk_ui_manager_get_action(gg->main_menu_manager, "/menubar/File/Quit"), false); ans = RS_ggobiInstance(gg); } else { ggobiInit(&n, &c_args); ans = NEW_LOGICAL(1); LOGICAL_DATA(ans)[0] = TRUE; } g_free(c_args); GGobi_setMissingValueIdentifier(isMissingValue); gdk_flush(); return(ans); } /** Get a reference to a specific GGobi instance by indexing into the list of active/alive GGobis. */ USER_OBJECT_ RS_GGOBI(getGGobi)(USER_OBJECT_ which) { USER_OBJECT_ ans; ggobid *gg; int n = GET_LENGTH(which), i, index; PROTECT(ans = NEW_LIST(n)); for(i = 0; i < n ; i ++) { index = INTEGER_DATA(which)[i]; gg = ggobi_get(index-1); if(gg) { SET_VECTOR_ELT(ans,i, RS_ggobiInstance(gg)); } } UNPROTECT(1); return(ans); } USER_OBJECT_ RS_ggobiInstance(ggobid *gg) { return(toRPointer(gg, "GGobi")); } USER_OBJECT_ RS_GGOBI(getDescription)(USER_OBJECT_ ggobiId) { ggobid *gg = toGGobi(ggobiId); GGobiData *d; gint numSlots = 3, numDatasets, i; DataMode mode; USER_OBJECT_ ans, names, tmp; const gchar *tmpname; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(gg == NULL) { RS_throwError("Invalid reference to GGobi instance"); } if(!gg->d) { return(NULL_USER_OBJECT); } PROTECT(ans = NEW_LIST(numSlots)); PROTECT(names = NEW_CHARACTER(numSlots)); SET_VECTOR_ELT(ans, 0, NEW_CHARACTER(1)); tmpname = GGOBI(getFileName(gg)); if (tmpname) SET_STRING_ELT(VECTOR_ELT(ans, 0), 0, COPY_TO_USER_STRING((gchar *)tmpname)); SET_STRING_ELT(names, 0, COPY_TO_USER_STRING("Filename")); SET_VECTOR_ELT(ans, 1, NEW_INTEGER(1)); mode = GGOBI(getDataMode)(gg); INTEGER_DATA(VECTOR_ELT(ans, 1))[0] = mode; PROTECT(tmp = NEW_CHARACTER(1)); SET_NAMES(VECTOR_ELT(ans, 1), tmp); UNPROTECT(1); SET_STRING_ELT(names, 1, COPY_TO_USER_STRING("Data mode")); numDatasets = g_slist_length (gg->d); SET_VECTOR_ELT(ans, 2, tmp = allocMatrix(INTSXP, numDatasets, 2)); for(i = 0; i < numDatasets ; i++) { d = (GGobiData *) g_slist_nth_data (gg->d, i); INTEGER_DATA(tmp)[i] = d->nrows; INTEGER_DATA(tmp)[i + numDatasets] = d->ncols; } SET_STRING_ELT(names, 2, COPY_TO_USER_STRING("Data dimensions")); SET_NAMES(ans, names); UNPROTECT(2); return(ans); } USER_OBJECT_ RS_GGOBI(isValid)(USER_OBJECT_ gobi) { USER_OBJECT_ ans = NEW_LOGICAL(1); LOGICAL_DATA(ans)[0] = GGOBI_IS_GGOBI(toGGobi(gobi)); return(ans); } ggobid * toGGobi(USER_OBJECT_ s_ggobi) { if(inherits(s_ggobi, "GGobi")) { ggobid *gg; gg = ValidateGGobiRef(getPtrValue(s_ggobi), false); return(gg); } g_critical("A GGobi R object must inherit from class 'GGobiGGobi'"); return(NULL); } void RS_GGOBI(getNumGGobiInstances)(guint *ans) { ans[0] = GGOBI(getNumGGobis)(); } USER_OBJECT_ RS_GGOBI(close)(USER_OBJECT_ gobi) { ggobid *gg = toGGobi(gobi); USER_OBJECT_ ans = NEW_LOGICAL(1); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(gg) { LOGICAL_DATA(ans)[0] = GGOBI(close)(gg, true); gdk_flush(); } return(ans); } #include "GGStructSizes.c" USER_OBJECT_ RS_GGOBI(getStructSizes)(USER_OBJECT_ local) { const GGobi_StructSize *sizes; int n = 0, i; USER_OBJECT_ ans, names; if(LOGICAL_DATA(local)[0]) { sizes = GGOBI(getGGobiStructs)(&n); } else { sizes = GGOBI(getStructs)(&n); } PROTECT(ans = NEW_INTEGER(n)); PROTECT(names = NEW_CHARACTER(n)); for(i = 0; i < n ; i++) { INTEGER_DATA(ans)[i] = sizes[i].size; SET_STRING_ELT(names, i, COPY_TO_USER_STRING(sizes[i].name)); } SET_NAMES(ans, names); UNPROTECT(2); return(ans); } USER_OBJECT_ RS_GGOBI(ggobi_find_data_file)(USER_OBJECT_ name) { return(asRString(ggobi_find_data_file(asCString(name)))); } void RS_GGOBI(flush)() { gdk_flush(); } rggobi/src/modes.c0000644000176000001440000000560511777244105013633 0ustar ripleyusers#include "RSGGobi.h" #include #include USER_OBJECT_ RS_GGOBI(setIMode)(USER_OBJECT_ name, USER_OBJECT_ s_display) { displayd *display = toDisplay(s_display); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); GGOBI(setIMode)(CHAR_DEREF(STRING_ELT(name, 0)), display->ggobi); gdk_flush(); return(NULL_USER_OBJECT); } USER_OBJECT_ RS_GGOBI(setPMode)(USER_OBJECT_ name, USER_OBJECT_ s_display) { displayd *display = toDisplay(s_display); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); GGOBI(setPMode)(CHAR_DEREF(STRING_ELT(name, 0)), display->ggobi); return(NULL_USER_OBJECT); } USER_OBJECT_ RS_GGOBI(getIModeName)(USER_OBJECT_ s_display) { USER_OBJECT_ ans; const gchar *tmp; displayd *display = toDisplay(s_display); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); tmp = GGOBI(getIModeName)(imode_get(display->ggobi)); PROTECT(ans = NEW_CHARACTER(1)); if(tmp && tmp[0]) SET_STRING_ELT(ans, 0, COPY_TO_USER_STRING(tmp)); UNPROTECT(1); return(ans); } USER_OBJECT_ RS_GGOBI(getPModeName)(USER_OBJECT_ s_display) { USER_OBJECT_ ans; const gchar *tmp; displayd *display = toDisplay(s_display); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); tmp = GGOBI(getPModeName)(pmode_get(display, display->ggobi)); PROTECT(ans = NEW_CHARACTER(1)); if(tmp && tmp[0]) SET_STRING_ELT(ans, 0, COPY_TO_USER_STRING(tmp)); UNPROTECT(1); return(ans); } USER_OBJECT_ RS_INTERNAL_GGOBI(getModeNames)(USER_OBJECT_ s_display_type, const gchar* s_mode_type) { USER_OBJECT_ ans; GType type = g_type_from_name(asCString(s_display_type)); GGobiExtendedDisplayClass *display_class; xmlDocPtr doc; xmlXPathContextPtr ctx; xmlXPathObjectPtr result; gchar *expr; gint i; g_return_val_if_fail(type != G_TYPE_INVALID, NULL_USER_OBJECT); expr = g_strdup_printf("//menu[@action = '%s']/menuitem/@action", s_mode_type); display_class = g_type_class_peek(type); doc = xmlParseDoc(BAD_CAST(display_class->mode_ui_get(NULL))); ctx = xmlXPathNewContext(doc); result = xmlXPathEvalExpression(BAD_CAST(expr), ctx); PROTECT(ans = NEW_CHARACTER(xmlXPathNodeSetGetLength(result->nodesetval))); for (i = 0; i < GET_LENGTH(ans); i++) { xmlChar *str = xmlXPathCastNodeToString(xmlXPathNodeSetItem(result->nodesetval, i)); SET_STRING_ELT(ans, i, mkChar((gchar *)str)); free(str); } xmlXPathFreeObject(result); xmlXPathFreeContext(ctx); xmlFreeDoc(doc); g_free(expr); UNPROTECT(1); return ans; } USER_OBJECT_ RS_GGOBI(getPModeNames)(USER_OBJECT_ s_type_name) { USER_OBJECT_ ans; ans = RS_INTERNAL_GGOBI(getModeNames)(s_type_name, "PMode"); return(ans); } USER_OBJECT_ RS_GGOBI(getIModeNames)(USER_OBJECT_ s_type_name) { USER_OBJECT_ ans; ans = RS_INTERNAL_GGOBI(getModeNames)(s_type_name, "IMode"); return(ans); } rggobi/src/data.c0000644000176000001440000000607711777244105013441 0ustar ripleyusers#include "RSGGobi.h" #include "RUtils.h" /* Adds a dataset using data from the specified file */ USER_OBJECT_ RS_GGOBI(setFile)(USER_OBJECT_ fileName, USER_OBJECT_ smode, USER_OBJECT_ add, USER_OBJECT_ gobiId) { DataMode mode; ggobid *gg = toGGobi(gobiId); USER_OBJECT_ ans = NEW_INTEGER(1); const gchar *modeName = NULL; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(IS_CHARACTER(smode)) modeName = CHAR_DEREF(STRING_ELT(smode, 0)); else if(IS_INTEGER(smode)) { mode = INTEGER_DATA(smode)[0]; if(mode < 0) mode = unknown_data; } if(fileset_read_init(CHAR_DEREF(STRING_ELT(fileName, 0)), modeName, NULL, gg)) { INTEGER_DATA(ans)[0] = g_slist_length(gg->d)-1; display_menu_build(gg); } else INTEGER_DATA(ans)[0] = -1; return(ans); } USER_OBJECT_ RS_GGOBI(getNumDatasets)(USER_OBJECT_ gobiID) { ggobid *gg = toGGobi(gobiID); USER_OBJECT_ ans = NEW_INTEGER(1); if(gg != NULL) INTEGER_DATA(ans)[0] = g_slist_length(gg->d); return(ans); } /* Returns the names of the datasets within the specified ggobid object. */ USER_OBJECT_ RS_GGOBI(getDatasetNames)(USER_OBJECT_ gobiId) { USER_OBJECT_ ans; ggobid *gg = toGGobi(gobiId); int i; GGobiData *d; GSList *tmp; int n; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); tmp = gg->d; n = g_slist_length(gg->d); PROTECT(ans = NEW_CHARACTER(n)); for(i = 0; i < n ; i++) { d =(GGobiData *) tmp->data; SET_STRING_ELT(ans, i, COPY_TO_USER_STRING(d->name)); tmp = tmp->next; } UNPROTECT(1); return(ans); } USER_OBJECT_ RS_GGOBI(getData)(USER_OBJECT_ datasetId) { GGobiData *d; USER_OBJECT_ ans, colnames, el; gint nr, nc; gint j, m; vartabled *vt; ans = NULL_USER_OBJECT; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); if (!d) return(NULL_USER_OBJECT); nr = d->nrows; nc = d->ncols; if(nr == 0 || nc == 0) return(NULL_USER_OBJECT); PROTECT(colnames = NEW_CHARACTER(nc)); PROTECT(ans = NEW_LIST(nc)); for(j = 0; j < nc; j++) { vt = vartable_element_get(j, d); SET_STRING_ELT(colnames, j, COPY_TO_USER_STRING(ggobi_data_get_col_name(d, j))); PROTECT(el = NEW_NUMERIC(nr)); for (m = 0; m < nr; m++) { if(ggobi_data_is_missing(d, m, j)) NUMERIC_DATA(el)[m] = NA_REAL; else NUMERIC_DATA(el)[m] = d->raw.vals[m][j]; } if(vt->vartype == categorical) { PROTECT(el = createFactor(el, vt, d, j)); } SET_VECTOR_ELT(ans, j, el); UNPROTECT(1 + (vt->vartype == categorical)); } SET_NAMES(ans, colnames); UNPROTECT(2); return(ans); } USER_OBJECT_ RS_GGOBI(getDataset)(USER_OBJECT_ which, USER_OBJECT_ gobiID) { int i, n; ggobid *gg = toGGobi(gobiID); USER_OBJECT_ ans = NULL_USER_OBJECT; if(gg == NULL) return(ans); n = GET_LENGTH(which); PROTECT(ans = NEW_LIST(n)); for(i = 0; i < n; i++) { int val = INTEGER_DATA(which)[i]; GGobiData *d = (GGobiData *) g_slist_nth_data(gg->d, val); if(d) { SET_VECTOR_ELT(ans, i, RS_datasetInstance(d)); } } UNPROTECT(1); return(ans); } rggobi/src/RUtils.h0000644000176000001440000000035411777244105013747 0ustar ripleyusers#ifndef RUTILS_H #define RUTILS_H #include "RSGGobi.h" int R_IS(USER_OBJECT_ obj, const char * const name); void RS_throwError(char *msg); USER_OBJECT_ createFactor(USER_OBJECT_ vals, vartabled *vt, GGobiData *d, int which); #endif rggobi/src/RSGGobi.h0000644000176000001440000000134411777244105013761 0ustar ripleyusers#ifndef RSGGOBI_H #define RSGGOBI_H #include "RSCommon.h" #include "GGobiAPI.h" #include "conversion.h" /* Identifies a routine that interfaces directly with R */ #define RS_GGOBI(a) RS_GGOBI_##a /* Identifies a routine that cannot be called directly from R/S via a .C or .Call, but that is part of this package's symbol table. */ #define RS_INTERNAL_GGOBI(a) RSint_GGOBI_##a USER_OBJECT_ RS_INTERNAL_GGOBI(getDisplay)(gboolean full, displayd *display, ggobid *gg); void RGGobiErrorHandler(int status); int isMissingValue(double d); #include "externs.h" USER_OBJECT_ RS_INTERNAL_GGOBI(getVariableNames)(GGobiData *d); USER_OBJECT_ RS_INTERNAL_GGOBI(getColorName)(gint cid, ggobid *gg); #include "RSGGobiEntryPoints.h" #endif rggobi/src/colorSchemes.c0000644000176000001440000002515211777244105015151 0ustar ripleyusers#include "RSGGobi.h" #include /* For the R_IsNaN() routine. */ /** This gets and sets the colorschemes in a GGobi instance or the session options. */ USER_OBJECT_ RSGGobi_Internal_getColorSchemes(GList *schemes); USER_OBJECT_ RSGGobi_Internal_getColorScheme(colorschemed *scheme); USER_OBJECT_ RSGGobi_Internal_getColor(gfloat *vals, colorscaletype type, int n); colorschemed *RS_createGGobiScheme(USER_OBJECT_ scheme, USER_OBJECT_ name); gfloat *RS_setGGobiColor(USER_OBJECT_ colors); static GList * RSGGobi_Internal_getSchemeFromGGobi(USER_OBJECT_ gobiId) { GList *schemes = NULL; if(GET_LENGTH(gobiId)) { ggobid *gg; gg = toGGobi(gobiId); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL); schemes = gg->colorSchemes; } else if(sessionOptions) { schemes = sessionOptions->colorSchemes; } else { g_critical("GGobi has not been initialized yet. Please create an instance!"); } return(schemes); } USER_OBJECT_ RS_GGOBI(getColorSchemes)(USER_OBJECT_ gobiId) { GList *schemes; schemes = RSGGobi_Internal_getSchemeFromGGobi(gobiId); return(RSGGobi_Internal_getColorSchemes(schemes)); } USER_OBJECT_ RSGGobi_Internal_getColorSchemes(GList *schemes) { int i, n; USER_OBJECT_ ans, names; colorschemed *s; n = g_list_length(schemes); PROTECT(ans = NEW_LIST(n)); PROTECT(names = NEW_CHARACTER(n)); for(i = 0; i < n ; i++) { s = (colorschemed *) g_list_nth_data(schemes, i); SET_STRING_ELT(names, i, COPY_TO_USER_STRING(s->name)); SET_VECTOR_ELT(ans, i, RSGGobi_Internal_getColorScheme(s)); } SET_NAMES(ans, names); UNPROTECT(2); return(ans); } enum { CS_COLORS, CS_BACKGROUND, CS_ANNOTATIONS, CS_CRITICAL_VALUE, CS_DESCRIPTION, CS_TYPE, CS_SYSTEM, CS_NAME, CS_NUM_SLOTS }; static gchar *cs_names[] = { "colors", "background", "annotations", "criticalvalue", "description", "type", "system", "name" }; USER_OBJECT_ RSGGobi_Internal_getColorScheme(colorschemed *scheme) { USER_OBJECT_ ans, tmp, names; int i, n; PROTECT(ans = NEW_LIST(CS_NUM_SLOTS)); n = scheme->n; PROTECT(names = NEW_CHARACTER(n)); PROTECT(tmp = NEW_LIST(n)); for(i = 0; i < n; i++) { SET_VECTOR_ELT(tmp, i, RSGGobi_Internal_getColor(scheme->data[i], scheme->type, 3)); SET_STRING_ELT(names, i, COPY_TO_USER_STRING(g_array_index(scheme->colorNames, gchar *, i))); } SET_NAMES(tmp, names); SET_VECTOR_ELT(ans, CS_COLORS, tmp); UNPROTECT(2); SET_VECTOR_ELT(ans, CS_BACKGROUND, RSGGobi_Internal_getColor(scheme->bg, scheme->type, 3)); SET_VECTOR_ELT(ans, CS_ANNOTATIONS, RSGGobi_Internal_getColor(scheme->accent, scheme->type, 3)); PROTECT(tmp = NEW_INTEGER(1)); INTEGER_DATA(tmp)[0] = scheme->criticalvalue; SET_VECTOR_ELT(ans, CS_CRITICAL_VALUE, tmp); UNPROTECT(1); PROTECT(tmp = NEW_CHARACTER(1)); if(scheme->description) SET_STRING_ELT(tmp, 0, COPY_TO_USER_STRING(scheme->description)); SET_VECTOR_ELT(ans, CS_DESCRIPTION, tmp); UNPROTECT(1); PROTECT(names = NEW_CHARACTER(1)); PROTECT(tmp = NEW_INTEGER(1)); { char *schemeName = ""; switch(scheme->type) { case rgb: schemeName = "diverging"; break; case hsv: schemeName = "sequential"; break; case cmy: schemeName = "spectral"; break; case cmyk: schemeName = "qualitative"; break; default: break; } SET_STRING_ELT(names, 0, COPY_TO_USER_STRING(schemeName)); } INTEGER_DATA(tmp)[0] = scheme->type; SET_NAMES(tmp, names); SET_VECTOR_ELT(ans, CS_TYPE, tmp); UNPROTECT(2); PROTECT(names = NEW_CHARACTER(1)); PROTECT(tmp = NEW_INTEGER(1)); { char *schemeName = ""; switch(scheme->system) { case rgb: schemeName = "rgb"; break; case hsv: schemeName = "hsv"; break; case cmy: schemeName = "cmy"; break; case cmyk: schemeName = "cmyk"; break; default: break; } SET_STRING_ELT(names, 0, COPY_TO_USER_STRING(schemeName)); } INTEGER_DATA(tmp)[0] = scheme->system; SET_NAMES(tmp, names); SET_VECTOR_ELT(ans, CS_SYSTEM, tmp); UNPROTECT(2); PROTECT(tmp = NEW_CHARACTER(1)); SET_STRING_ELT(tmp, 0, COPY_TO_USER_STRING(scheme->name)); SET_VECTOR_ELT(ans, CS_NAME, tmp); UNPROTECT(1); SET_NAMES(ans, asRStringArrayWithSize(cs_names, CS_NUM_SLOTS)); UNPROTECT(1); return(ans); } USER_OBJECT_ RSGGobi_Internal_getColor(gfloat *vals, colorscaletype type, int n) { USER_OBJECT_ ans; int i; ans = NEW_NUMERIC(n); for(i = 0; i < n; i++) { NUMERIC_DATA(ans)[i] = vals ? vals[i] : NA_REAL; } return(ans); } USER_OBJECT_ RS_GGOBI(addColorScheme)(USER_OBJECT_ sscheme, USER_OBJECT_ name, USER_OBJECT_ overwrite, USER_OBJECT_ gobiId) { USER_OBJECT_ ans; int index = 0; colorschemed *scheme; GList *schemes = RSGGobi_Internal_getSchemeFromGGobi(gobiId); scheme = RS_createGGobiScheme(sscheme, name); /* Perhaps we need to inform the Color scheme tool if it is open, and add it to the tree. Similarly, if we set the active scheme from R, we should tell everybody that might be interested. */ if(LOGICAL_DATA(overwrite)[0]) { /* */ /* g_list_find_custom(); */ } else { schemes = g_list_append(schemes, scheme); index = g_list_length(schemes); } ans = NEW_INTEGER(1); INTEGER_DATA(ans)[0] = index; return(ans); } colorschemed * RS_createGGobiScheme(USER_OBJECT_ sscheme, USER_OBJECT_ name) { colorschemed *scheme; int n, i; USER_OBJECT_ colorNames; const char *str; gchar *gstr; SEXP colors; gfloat *tmp; scheme = alloc_colorscheme(sizeof(colorschemed)); if(!scheme) { PROBLEM "Cannot allocate space for color scheme" ERROR; } scheme->type = INTEGER_DATA(GET_SLOT(sscheme, Rf_install("type")))[0]; scheme->system = INTEGER_DATA(GET_SLOT(sscheme, Rf_install("system")))[0]; scheme->criticalvalue = INTEGER_DATA(GET_SLOT(sscheme, Rf_install("criticalvalue")))[0]; scheme->name = g_strdup(CHAR_DEREF(STRING_ELT(name, 0))); scheme->description = g_strdup(CHAR_DEREF(STRING_ELT(GET_SLOT(sscheme, Rf_install("description")), 0))); colors = GET_SLOT(sscheme, Rf_install("colors")); scheme->n = n = GET_LENGTH(colors); colorNames = GET_NAMES(colors); scheme->data = (gfloat **) g_malloc(sizeof(gfloat *) * n); for(i = 0; i < n; i++) { if(GET_LENGTH(colorNames) && (str = CHAR_DEREF(STRING_ELT(colorNames, i)))) { gstr = g_strdup(str); g_array_append_val(scheme->colorNames, gstr); } scheme->data[i] = RS_setGGobiColor(VECTOR_ELT(colors, i)); } tmp = RS_setGGobiColor(GET_SLOT(sscheme, Rf_install("background"))); if(tmp) scheme->bg = tmp; tmp = RS_setGGobiColor(GET_SLOT(sscheme, Rf_install("annotations"))); if(tmp) scheme->accent = tmp; return(scheme); } gfloat * RS_setGGobiColor(USER_OBJECT_ colors) { int j, numVals; gfloat *data; colors = GET_SLOT(colors, Rf_install(".Data")); numVals = GET_LENGTH(colors); data = g_malloc(sizeof(gfloat) * numVals); for(j = 0; j < numVals ; j++) { double val; val = NUMERIC_DATA(colors)[j]; if(R_IsNaN(val)) { g_free(data); return(NULL); } data[j] = val; } return(data); } static int schemeNameCompare(gconstpointer scheme, gconstpointer data) { return(strcmp(((colorschemed *)scheme)->name, (char *)data)); } USER_OBJECT_ RS_GGOBI(getActiveColorScheme)(USER_OBJECT_ gobiId) { USER_OBJECT_ ans = NULL_USER_OBJECT; colorschemed *scheme = NULL; /*PROTECT(ans = NEW_CHARACTER(1)); SET_STRING_ELT(ans, 0, COPY_TO_USER_STRING(sessionOptions->activeColorScheme)); UNPROTECT(1); return(ans); */ if(GET_LENGTH(gobiId) == 0) { scheme = findColorSchemeByName(sessionOptions->colorSchemes, sessionOptions->activeColorScheme); } else { ggobid *gg = toGGobi(gobiId); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); scheme = gg->activeColorScheme; } if(scheme) ans = RSGGobi_Internal_getColorScheme(scheme); return(ans); } USER_OBJECT_ RS_GGOBI(setActiveColorScheme)(USER_OBJECT_ id, USER_OBJECT_ gobiId) { USER_OBJECT_ ans; char *tmp = NULL; GList *schemes; ggobid *gg = NULL; colorschemed *newScheme = NULL; if(GET_LENGTH(gobiId) == 0) { if(sessionOptions) { tmp = sessionOptions->activeColorScheme; if(IS_INTEGER(id)) { if(sessionOptions->colorSchemes) { newScheme = g_list_nth_data(sessionOptions->colorSchemes, INTEGER_DATA(id)[0]); if(newScheme) sessionOptions->activeColorScheme = g_strdup(newScheme->name); else { PROBLEM "No such color scheme available in the session options." ERROR; } } else { PROBLEM "No color schemes available in the session options." ERROR; } } else if(IS_CHARACTER(id)) { sessionOptions->activeColorScheme = g_strdup(CHAR_DEREF(STRING_ELT(id, 0))); if(sessionOptions->colorSchemes) newScheme = findColorSchemeByName(sessionOptions->colorSchemes, sessionOptions->activeColorScheme); if(!newScheme) { PROBLEM "Setting default color scheme name in session options, but there is no such color scheme available." WARN; } } } else { PROBLEM "GGobi has not been initialized yet. Please initialize the engine (init.ggobi()) or create an instance (ggobi())!" ERROR; } } else { GList *scheme_el = NULL; gg = toGGobi(gobiId); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); schemes = RSGGobi_Internal_getSchemeFromGGobi(gobiId); if(!schemes) { PROBLEM "Cannot get color schemes list" ERROR; } if(gg->activeColorScheme) tmp = gg->activeColorScheme->name; if(IS_INTEGER(id)) scheme_el = g_list_nth(schemes, INTEGER_DATA(id)[0]); else if(IS_CHARACTER(id)) scheme_el = g_list_find_custom(schemes, CHAR_DEREF(STRING_ELT(id, 0)), schemeNameCompare); if (scheme_el) newScheme = scheme_el->data; if(newScheme) { GGobiData *d = (GGobiData *) g_slist_nth_data(gg->d, 0); gg->activeColorScheme = newScheme; colorscheme_init(newScheme); displays_plot (NULL, FULL, gg); symbol_window_redraw (gg); cluster_table_update (d, gg); gdk_flush(); } } if(tmp) { PROTECT(ans = NEW_CHARACTER(1)); SET_STRING_ELT(ans, 0, COPY_TO_USER_STRING(gg->activeColorScheme->name)); UNPROTECT(1); } else ans = NULL_USER_OBJECT; return(ans); } rggobi/src/RSEval.h0000644000176000001440000000057611777244105013667 0ustar ripleyusers#ifndef RS_GGOBI_EVAL_H #define RS_GGOBI_EVAL_H #include "Rinternals.h" USER_OBJECT_ RS_GGOBI(callFunction)(USER_OBJECT_ fn, USER_OBJECT_ argList); USER_OBJECT_ RS_GGOBI(callUserFunction)(const char *name, USER_OBJECT_ args); USER_OBJECT_ RS_GGOBI(findFunction)(const char *funcName); USER_OBJECT_ RS_GGOBI(callFunctionWithArgs)(USER_OBJECT_ fn, USER_OBJECT_ argList); #endif rggobi/src/conversion.h0000644000176000001440000001072711777244105014717 0ustar ripleyusers#ifndef CONVERSION_H #define CONVERSION_H #include "RSGGobi.h" typedef void* (*ElementConverter)(void *element); /***** ARRAY CONVERSION MACROS ******/ /* converts an array, taking the reference of each element, so that conversion functions taking a pointer parameter will work (array elements are values) */ #define asRArrayRef(array, converter) \ __extension__ \ ({ \ asRArray(&array, converter); \ }) #define asRArrayRefWithSize(array, converter, n) \ __extension__ \ ({ \ asRArrayWithSize(&array, converter, n); \ }) /* converts an array directly using the conversion function to an R list */ #define asRArray(array, converter) \ __extension__ \ ({ \ _asRArray(array, converter, LIST, VECTOR); \ }) #define asRArrayWithSize(array, converter, n) \ __extension__ \ ({ \ _asRArrayWithSize(array, converter, n, LIST, VECTOR); \ }) /* converts primitive (numeric, integer, logical) arrays to R vectors */ #define _asRPrimArray(array, TYPE) \ __extension__ \ ({ \ int n = 0; \ if (!array) \ NULL; \ while(array[n++]); \ _asRPrimArrayWithSize(array, n-1, TYPE); \ }) #define _asRPrimArrayWithSize(array, n, TYPE) \ __extension__ \ ({ \ int i; \ USER_OBJECT_ s_obj; \ PROTECT(s_obj = NEW_ ## TYPE(n)); \ \ for (i = 0; i < n; i++) { \ TYPE ## _POINTER(s_obj)[i] = array[i]; \ } \ \ UNPROTECT(1); \ s_obj; \ }) /* core converter, for converting string arrays and other arrays of pointer types */ #define _asRArray(array, converter, TYPE, SETTER_TYPE) \ __extension__ \ ({ \ int n = 0; \ if (!array) \ NULL; \ while(array[n++]); \ _asRArrayWithSize(array, converter, n-1, TYPE, SETTER_TYPE); \ }) #define _asRArrayWithSize(array, converter, n, TYPE, SETTER_TYPE) \ __extension__ \ ({ \ int i; \ USER_OBJECT_ s_obj; \ PROTECT(s_obj = NEW_ ## TYPE(n)); \ \ for (i = 0; i < n; i++) { \ SET_ ## SETTER_TYPE ## _ELT(s_obj, i, converter(array[i])); \ } \ \ UNPROTECT(1); \ s_obj; \ }) /* Below are primitive array -> R vector converters */ #define asRStringArray(array) \ __extension__ \ ({ \ _asRArray(array, COPY_TO_USER_STRING, CHARACTER, STRING); \ }) #define asRStringArrayWithSize(array, n) \ __extension__ \ ({ \ _asRArrayWithSize(array, COPY_TO_USER_STRING, n, CHARACTER, STRING); \ }) #define asRIntegerArray(array) \ __extension__ \ ({ \ _asRPrimArray(array, INTEGER); \ }) #define asRIntegerArrayWithSize(array, size) \ __extension__ \ ({ \ _asRPrimArrayWithSize(array, size, INTEGER); \ }) #define RAW_POINTER(x) RAW(x) #define asRRawArray(array) \ __extension__ \ ({ \ _asRPrimArray(array, RAW); \ }) #define asRRawArrayWithSize(array, size) \ __extension__ \ ({ \ _asRPrimArrayWithSize(array, size, RAW); \ }) #define asRNumericArray(array) \ __extension__ \ ({ \ _asRPrimArray(array, NUMERIC); \ }) #define asRNumericArrayWithSize(array, size) \ __extension__ \ ({ \ _asRPrimArrayWithSize(array, size, NUMERIC); \ }) #define asRLogicalArray(array) \ __extension__ \ ({ \ _asRPrimArray(array, LOGICAL); \ }) #define asRLogicalArrayWithSize(array, size) \ __extension__ \ ({ \ _asRPrimArrayWithSize(array, size, LOGICAL); \ }) /* now from R to C */ #define asCArrayRef(s, type, converter) \ __extension__ \ ({ \ asCArray(s, type, * converter); \ }) #define asCArray(s_array, type, converter) \ __extension__ \ ({ \ int i; \ \ type* array = (type*)R_alloc(GET_LENGTH(s_array), sizeof(type)); \ \ for (i = 0; i < GET_LENGTH(s_array); i++) { \ array[i] = (type)converter(VECTOR_ELT(s_array, i)); \ } \ \ array; \ }) gboolean asCLogical(USER_OBJECT_ s_log); int asCInteger(USER_OBJECT_ s_int); guchar asCRaw(USER_OBJECT_ s_raw); double asCNumeric(USER_OBJECT_ s_num); const char * asCString(USER_OBJECT_ s_str); char asCCharacter(USER_OBJECT_ s_char); USER_OBJECT_ asRLogical(Rboolean); USER_OBJECT_ asRInteger(int); USER_OBJECT_ asRRaw(guchar); USER_OBJECT_ asRNumeric(double); USER_OBJECT_ asRCharacter(char c); USER_OBJECT_ asRString(const char *); char ** asCStringArray(USER_OBJECT_ svec); /* NULL TERMINATES */ void *getPtrValue(USER_OBJECT_); USER_OBJECT_ toRPointer(void*, const char *name); /* GGobi specific converters */ /* R to C */ ggobid *toGGobi(USER_OBJECT_ s_ggobi); GGobiData *toData(USER_OBJECT_ d); displayd *toDisplay(USER_OBJECT_ rdisplay); /* Wrapping GGobi objects as SEXP's */ USER_OBJECT_ RS_datasetInstance(GGobiData *d) ; USER_OBJECT_ RS_ggobiInstance(ggobid *gg); USER_OBJECT_ RS_displayInstance(displayd *display); #endif rggobi/src/RSGGobiEntryPoints.h0000644000176000001440000001504711777244105016205 0ustar ripleyusers#ifndef RSGGOBI_ENTRY_POINTS #define RSGGOBI_ENTRY_POINTS void RS_GGOBI(getNumGGobiInstances)(guint *ans); USER_OBJECT_ RS_GGOBI(getNumDisplays)(USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(getNumberedKeyHandler)(USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(setNumberedKeyHandler)(USER_OBJECT_ handler, USER_OBJECT_ sdescription, USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(getNumPlotsInDisplay)(USER_OBJECT_ dpy); SEXP RS_GGOBI(getDisplayType)(SEXP dpy, SEXP ggobiId); USER_OBJECT_ RS_GGOBI(getDisplayTypes)(); USER_OBJECT_ RS_GGOBI(updateDisplay)(USER_OBJECT_ dpy, USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(setRowNames)(USER_OBJECT_ names, USER_OBJECT_ indices, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getRowNames)(USER_OBJECT_ data); USER_OBJECT_ RS_GGOBI(getRowsInPlot)(USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getSampledIndices)(USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(setSampledIndices)(USER_OBJECT_ vals, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getExcludedIndices)(USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(setExcludedIndices)(USER_OBJECT_ vals, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(setIMode)(USER_OBJECT_ name, USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(setPMode)(USER_OBJECT_ name, USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(getIModeName)(USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(getPModeName)(USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(setBrushColor)(USER_OBJECT_ cid, USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(getBrushColor)(USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(setBrushGlyph)(USER_OBJECT_ vals, USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(getBrushGlyph)(USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(setCasesHidden)(USER_OBJECT_ vals, USER_OBJECT_ which, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getCasesHidden)(USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(addVariable)(USER_OBJECT_ vals, USER_OBJECT_ name, USER_OBJECT_ levels, USER_OBJECT_ values, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(varpanel_populate)(USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(GGobiData_init)(USER_OBJECT_ cleanup, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(setVariableValues)(USER_OBJECT_ vals, USER_OBJECT_ rowIds, USER_OBJECT_ colId, USER_OBJECT_ update, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(setVariableNames)(USER_OBJECT_ vars, USER_OBJECT_ names, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(raiseOrLowerDisplays)(USER_OBJECT_ displays, USER_OBJECT_ iconify, USER_OBJECT_ raise, USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(getVariables)(USER_OBJECT_ which, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getMainWindow)(USER_OBJECT_ gobiId); USER_OBJECT_ RS_GGOBI(getCurrentDisplay)(USER_OBJECT_ gobiId); USER_OBJECT_ RS_GGOBI(getPlugins)(USER_OBJECT_ gobiId); USER_OBJECT_ RS_GGOBI(getPluginInfo)(USER_OBJECT_ gobiId); USER_OBJECT_ RS_GGOBI(getDatasetNames)(USER_OBJECT_ gobiId); USER_OBJECT_ RS_GGOBI(getVariableNames)(USER_OBJECT_ transformed, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getActiveColorScheme)(USER_OBJECT_ gobiId); USER_OBJECT_ RS_GGOBI(setActiveColorScheme)(USER_OBJECT_ id, USER_OBJECT_ gobiId); USER_OBJECT_ RS_GGOBI(addColorScheme)(USER_OBJECT_ sscheme, USER_OBJECT_ name, USER_OBJECT_ overwrite, USER_OBJECT_ gobiId); USER_OBJECT_ RS_GGOBI(setDisplaySize)(USER_OBJECT_ newDims, USER_OBJECT_ displayId, USER_OBJECT_ ggobiID); USER_OBJECT_ RS_GGOBI(setEdges)(USER_OBJECT_ x, USER_OBJECT_ y, USER_OBJECT_ append, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getDatasetRecordIds)(USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getData)(USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(setFile)(USER_OBJECT_ fileName, USER_OBJECT_ smode, USER_OBJECT_ add, USER_OBJECT_ gobiId); USER_OBJECT_ RS_GGOBI(getNumDatasets)(USER_OBJECT_ gobiID); USER_OBJECT_ RS_GGOBI(getSourceName)(USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getDisplayDataset)(USER_OBJECT_ dpy); USER_OBJECT_ RS_GGOBI(getDataset)(USER_OBJECT_ which, USER_OBJECT_ gobiID); USER_OBJECT_ RS_GGOBI(getCurrentDisplayType)(USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(getDisplayOptions)(USER_OBJECT_ which); USER_OBJECT_ RS_GGOBI(setDisplayOptions)(USER_OBJECT_ which, USER_OBJECT_ values); USER_OBJECT_ RS_GGOBI(getActivePlot)(USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(setActivePlot)(USER_OBJECT_ which, USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(closeDisplay)(USER_OBJECT_ ref, USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(getDescription)(USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(setCaseGlyphs)(USER_OBJECT_ vals, USER_OBJECT_ sizes, USER_OBJECT_ which, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(setCaseColors)(USER_OBJECT_ vals, USER_OBJECT_ which, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getCaseColors)(USER_OBJECT_ ids, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getCaseGlyphs)(USER_OBJECT_ ids, USER_OBJECT_ datasetID); USER_OBJECT_ RS_GGOBI(close)(USER_OBJECT_ gobi); USER_OBJECT_ RS_GGOBI(isValid)(USER_OBJECT_ gobi); USER_OBJECT_ RS_GGOBI(createEdgeDataset)(USER_OBJECT_ numPoints, USER_OBJECT_ sname, USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(getConnectedEdges)(USER_OBJECT_ edgesetId, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getSymbolicEdges)(USER_OBJECT_ edgesetId); USER_OBJECT_ RS_GGOBI(getMainMenubar)(USER_OBJECT_ gobi); USER_OBJECT_ RS_GGOBI(getDisplayMenubar)(USER_OBJECT_ display, USER_OBJECT_ gobiId); USER_OBJECT_ RS_GGOBI(setDisplayEdges)(USER_OBJECT_ dpys, USER_OBJECT_ edgeData, USER_OBJECT_ directed, USER_OBJECT_ On, USER_OBJECT_ ggobiId); USER_OBJECT_ RS_GGOBI(setBrushSize)(USER_OBJECT_ dims, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(setBrushLocation)(USER_OBJECT_ loc, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getColorSchemes)(USER_OBJECT_ gobiId); USER_OBJECT_ RS_GGOBI(init)(USER_OBJECT_ args, USER_OBJECT_ createInstance); SEXP RS_GGOBI(createPlots)(SEXP plotDescList, SEXP dims, SEXP cells, SEXP gobiId, SEXP rdisplay, SEXP dataset); USER_OBJECT_ RS_GGOBI(setDisplayVariables)(USER_OBJECT_ vars, USER_OBJECT_ varPrev, USER_OBJECT_ dpy); void RS_GGOBI(getNumGGobiInstances)(guint *ans); void RS_GGOBI(flush)(); USER_OBJECT_ RS_GGOBI(setVariableTypes)(USER_OBJECT_ vars, USER_OBJECT_ values, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(setAsTimeVariables)(USER_OBJECT_ vars, USER_OBJECT_ values, USER_OBJECT_ datasetId); USER_OBJECT_ RS_GGOBI(getIModeNames)(USER_OBJECT_ s_type_name); USER_OBJECT_ RS_GGOBI(getPModeNames)(USER_OBJECT_ s_type_name); USER_OBJECT_ RS_GGOBI(setPlotScale)(USER_OBJECT_ x, USER_OBJECT_ y, USER_OBJECT_ rdisplay, USER_OBJECT_ plot); USER_OBJECT_ RS_GGOBI(getPlotScale)(USER_OBJECT_ rdisplay, USER_OBJECT_ plot); #endif rggobi/src/displays.c0000644000176000001440000000716411777244105014356 0ustar ripleyusers#include "RSGGobi.h" #include USER_OBJECT_ RS_GGOBI(getNumDisplays)(USER_OBJECT_ ggobiId) { ggobid *gg = toGGobi(ggobiId); int len; USER_OBJECT_ ans = NEW_INTEGER(1); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(gg) { len = g_list_length(gg->displays); INTEGER_DATA(ans)[0] = len; } return(ans); } /* how about getting the current display and then getting its type? */ USER_OBJECT_ RS_GGOBI(getCurrentDisplayType)(USER_OBJECT_ ggobiId) { ggobid *gg = toGGobi(ggobiId); USER_OBJECT_ ans; const gchar *name = GGOBI(getCurrentDisplayType)(gg); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); PROTECT(ans = NEW_CHARACTER(1)); SET_STRING_ELT(ans, 0, COPY_TO_USER_STRING(name)); UNPROTECT(1); return(ans); } /** queries ggobi's list of display types, assuming GGobi has been initialized. */ USER_OBJECT_ RS_GGOBI(getDisplayTypes)() { GSList *l; gint n; USER_OBJECT_ ans, names; l = GGOBI(getExtendedDisplayTypes)(); n = g_slist_length(l); PROTECT(ans = NEW_LIST(n)); PROTECT(names = NEW_CHARACTER(n)); n = 0; for( ; l ; l = l->next, n++) { GGobiExtendedDisplayClass *klass; klass = GGOBI_EXTENDED_DISPLAY_CLASS((GtkObjectClass*) l->data); SET_STRING_ELT(names, n, COPY_TO_USER_STRING(klass->titleLabel)); SET_VECTOR_ELT(ans, n, asRString(g_type_name(G_OBJECT_CLASS_TYPE(klass)))); } SET_NAMES(ans, names); UNPROTECT(2); return(ans); } USER_OBJECT_ RS_GGOBI(raiseOrLowerDisplays)(USER_OBJECT_ displays, USER_OBJECT_ iconify, USER_OBJECT_ raise, USER_OBJECT_ ggobiId) { USER_OBJECT_ ans; int numDisplays = GET_LENGTH(displays), i; if(numDisplays == 0) return(NULL_USER_OBJECT); PROTECT(ans = NEW_LOGICAL(numDisplays)); for(i = 0; i < numDisplays; i++) { displayd *display; windowDisplayd *wdpy; display = toDisplay(VECTOR_ELT(displays, i)); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); wdpy = GGOBI_WINDOW_DISPLAY(display); if(LOGICAL_DATA(iconify)[0] == FALSE) { if(LOGICAL_DATA(raise)[0]) gdk_window_raise(wdpy->window->window); else gdk_window_lower(wdpy->window->window); } else { /* This doesn't seem to iconify things, just kill them! XIconifyWindow(GDK_WINDOW_XDISPLAY(GTK_WIDGET(window)->window), GDK_WINDOW_XWINDOW(GTK_WIDGET(window)->window), DefaultScreen (GDK_DISPLAY ())); */ if(LOGICAL_DATA(raise)[0]) gtk_widget_show_all(wdpy->window); else gtk_widget_hide_all(wdpy->window); } LOGICAL_DATA(ans)[i] = TRUE; } UNPROTECT(1); gdk_flush(); return(ans); } USER_OBJECT_ RS_INTERNAL_GGOBI(getDisplays)(ggobid *gg) { USER_OBJECT_ ans; gint n, i; GList *dlist; n = g_list_length(gg->displays); PROTECT(ans = NEW_LIST(n)); i = 0; for (dlist = gg->displays; dlist ; dlist = dlist->next, i++) { SET_VECTOR_ELT(ans, i, RS_displayInstance((displayd*)dlist->data)); } UNPROTECT(1); return(ans); } /* Get a list of the displays in the specified ggobi. This works recursively */ USER_OBJECT_ RS_GGOBI(getDisplays)(USER_OBJECT_ ggobiId) { ggobid *gg = toGGobi(ggobiId); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); return(RS_INTERNAL_GGOBI(getDisplays)(gg)); } USER_OBJECT_ RS_GGOBI(getCurrentDisplay)(USER_OBJECT_ gobiId) { ggobid *gg = toGGobi(gobiId); USER_OBJECT_ ans; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); ans = toRPointer(gg->current_display, "GtkWidget"); return(ans); } rggobi/src/edges.c0000644000176000001440000001370311777244105013611 0ustar ripleyusers#include "RSGGobi.h" #include "vars.h" USER_OBJECT_ RS_GGOBI(getSymbolicEdges)(USER_OBJECT_ edgesetId) { GGobiData *e = toData(edgesetId); USER_OBJECT_ ans, dim; gint i, ctr, n; g_return_val_if_fail(GGOBI_IS_DATA(e), NULL_USER_OBJECT); n = e->edge.n; if(!e) { PROBLEM "Invalid ggobi dataset identifier(s)" ERROR; } PROTECT(ans = NEW_CHARACTER(n * 2)); ctr = 0; for(i = 0; i < n; i++) { SET_STRING_ELT(ans, ctr, COPY_TO_USER_STRING(e->edge.sym_endpoints[i].a)); SET_STRING_ELT(ans, ctr+n, COPY_TO_USER_STRING(e->edge.sym_endpoints[i].b)); ctr++; } /* Now set the dim() on this vector to make it a matrix. The S code will put the dimnames on it. */ PROTECT(dim = NEW_INTEGER(2)); INTEGER_DATA(dim)[0] = n; INTEGER_DATA(dim)[1] = 2; SET_DIM(ans, dim); UNPROTECT(2); return(ans); } USER_OBJECT_ RS_GGOBI(getConnectedEdges)(USER_OBJECT_ edgesetId, USER_OBJECT_ datasetId) { GGobiData *d = toData(datasetId); GGobiData *e = toData(edgesetId); gint ctr; USER_OBJECT_ ans, dim; gint i, n; endpointsd *endpoints; g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); g_return_val_if_fail(GGOBI_IS_DATA(e), NULL_USER_OBJECT); n = e->edge.n; endpoints = resolveEdgePoints(e, d); if(!endpoints) return(NULL_USER_OBJECT); PROTECT(ans = NEW_INTEGER(n * 2)); ctr = 0; for(i = 0; i < n; i++) { INTEGER_DATA(ans)[ctr] = endpoints[i].a; INTEGER_DATA(ans)[ctr+n] = endpoints[i].b; ctr++; } /* Now set the dim() on this vector to make it a matrix. The S code will put the dimnames on it. */ PROTECT(dim = NEW_INTEGER(2)); INTEGER_DATA(dim)[0] = n; INTEGER_DATA(dim)[1] = 2; SET_DIM(ans, dim); UNPROTECT(2); return(ans); } USER_OBJECT_ RS_GGOBI(createEdgeDataset)(USER_OBJECT_ numPoints, USER_OBJECT_ sname, USER_OBJECT_ ggobiId) { ggobid *gg = toGGobi(ggobiId); GGobiData *d; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(!gg) { PROBLEM "Invalid reference to GGobi instance" ERROR; } d = ggobi_data_new(INTEGER_DATA(numPoints)[0], 0); if(!d) { PROBLEM "Invalid reference to GGobi instance" ERROR; } GGobi_setDataName(CHAR_DEREF(STRING_ELT(sname, 0)), d); pipeline_init(d, gg); return(RS_datasetInstance(d)); } USER_OBJECT_ RS_GGOBI(setEdges)(USER_OBJECT_ x, USER_OBJECT_ y, USER_OBJECT_ append, USER_OBJECT_ datasetId) { USER_OBJECT_ ans = NULL_USER_OBJECT; ggobid *gg; GGobiData *e; int num = GET_LENGTH(x); gint i; e = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(e), NULL_USER_OBJECT); gg = e->gg; if(!e) return(ans); if(LOGICAL_DATA(append)[0] == FALSE) { g_free(e->edge.sym_endpoints); e->edge.n = 0; } if(num > 0) { edges_alloc (e->edge.n + num, e); for(i = 0; i < num; i++) { e->edge.sym_endpoints[i].a = g_strdup(CHAR_DEREF(STRING_ELT(x, i))); e->edge.sym_endpoints[i].b = g_strdup(CHAR_DEREF(STRING_ELT(y, i))); e->edge.sym_endpoints[i].jpartner = -1; } } unresolveAllEdgePoints(e); if(gg->current_display) { edgeset_add(gg->current_display); displays_plot(NULL, FULL, gg); } gdk_flush(); ans = RS_datasetInstance(e); return(ans); } /** Newer, but old, version for the edges interface using multiple (at least 2) datasets for the point set and the edge set. This sets the connections between nodes. We can either replace the existing edges or append to that collection. The source and destination variables identify the nodes in pairs. */ USER_OBJECT_ RS_GGOBI(setEdgeIndices)(USER_OBJECT_ x, USER_OBJECT_ y, USER_OBJECT_ append, USER_OBJECT_ datasetId) { USER_OBJECT_ ans = NULL_USER_OBJECT; GGobiData *e; int num = GET_LENGTH(x); gint i; e = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(e), NULL_USER_OBJECT); if(!e) return(ans); if(LOGICAL_DATA(append)[0] == FALSE) { edges_free (e, e->gg); e->edge.n = 0; #ifdef OLD_STYLE_IDS e->edge.old_endpoints = NULL; #endif } edges_alloc (e->edge.n + num, e); for(i = 0; i < num; i++) { #ifdef OBSOLETE_EDGE_CODE /* Without the update argument, this would be a very slow way of doing this. We would end up re-allocating the edges_endpoint each time. However, pre-allocating it to *num means we have to tell setObservationEdge something to avoid it reallocating space itself. */ GGOBI(setObservationEdge)(INTEGER_DATA(x)[i], INTEGER_DATA(y)[i], e, e->gg, false); #endif #ifdef OLD_STYLE_IDS e->edge.old_endpoints[i].a = INTEGER_DATA(x)[i]; e->edge.old_endpoints[i].b = INTEGER_DATA(y)[i]; e->edge.old_endpoints[i].jpartner = -1; #endif } #ifdef OLD_STYLE_IDS setOldEdgePartners(e->edge.old_endpoints, e->edge.n); #endif edgeset_add(e->gg->current_display); displays_plot(NULL, FULL, e->gg); gdk_flush(); ans = RS_datasetInstance(e); return(ans); } USER_OBJECT_ RS_GGOBI(setDisplayEdges)(USER_OBJECT_ dpys, USER_OBJECT_ edgeData, USER_OBJECT_ directed, USER_OBJECT_ On, USER_OBJECT_ ggobiId) { int i, n; USER_OBJECT_ ans; displayd *gdpy; GGobiData *edge = NULL; ggobid *gg = toGGobi(ggobiId); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if (asCLogical(On)) { edge = toData(edgeData); g_return_val_if_fail(GGOBI_IS_DATA(edge), NULL_USER_OBJECT); } n = GET_LENGTH(dpys); PROTECT(ans = NEW_LIST(n)); for(i = 0; i < n ; i++) { GGobiData *old; gdpy = toDisplay(VECTOR_ELT(dpys, i)); g_return_val_if_fail(GGOBI_IS_DISPLAY(gdpy), NULL_USER_OBJECT); gdpy->options.edges_undirected_show_p = LOGICAL_DATA(On)[0]; if(GET_LENGTH(directed)) gdpy->options.edges_arrowheads_show_p = LOGICAL_DATA(directed)[0]; if(edge) { old = setDisplayEdge(gdpy, edge); if(old) { SET_VECTOR_ELT(ans, i, RS_datasetInstance(old)); } } } UNPROTECT(1); displays_plot(NULL, FULL, gg); gdk_flush(); return(ans); } rggobi/src/Makevars.win0000644000176000001440000000210311772574037014643 0ustar ripleyusersPKG_CPPFLAGS=-D_R_=1 -DUSE_R=1 -mms-bitfields -I$(GGOBI_PATH)/include/gtk-2.0 -I$(GGOBI_PATH)/include/gdk-pixbuf-2.0 -I$(GGOBI_PATH)/../lib/gtk-2.0/include -I$(GGOBI_PATH)/include/atk-1.0 -I$(GGOBI_PATH)/include/cairo -I$(GGOBI_PATH)/include/pango-1.0 -I$(GGOBI_PATH)/include/glib-2.0 -I$(GGOBI_PATH)/../lib/glib-2.0/include -I$(GGOBI_PATH)/include/libxml2 -I$(GGOBI_PATH)/include -I$(GGOBI_PATH)/include/ggobi -I$(R_HOME)/include -I$(GGOBI_PATH)/include/libxml ifeq "$(WIN)" "64" PKG_LIBS=-L$(GGOBI_PATH)/lib -lgtk-win32-2.0-0 -lgdk-win32-2.0-0 -latk-1.0-0 -lgdk_pixbuf-2.0-0 -lpangowin32-1.0-0 -lgdi32 -lpangocairo-1.0-0 -lpango-1.0-0 -lcairo-2 -lgobject-2.0-0 -lgmodule-2.0-0 -lglib-2.0-0 -lintl-8 -lxml2-2 -lzlib1 -lws2_32 -L$(GGOBI_PATH)/../lib -L$(GGOBI_PATH)/../ -lggobi else PKG_LIBS=-L$(GGOBI_PATH)/lib -lgtk-win32-2.0-0 -lgdk-win32-2.0-0 -latk-1.0-0 -lgdk_pixbuf-2.0-0 -lpangowin32-1.0-0 -lgdi32 -lpangocairo-1.0-0 -lpango-1.0-0 -lcairo-2 -lgobject-2.0-0 -lgmodule-2.0-0 -lglib-2.0-0 -lintl -liconv -lxml2 -lzlib1 -lws2_32 -L$(GGOBI_PATH)/../lib -L$(GGOBI_PATH)/../ -lggobi endif rggobi/src/Makevars0000644000176000001440000000111511777243545014053 0ustar ripleyusers PKG_CPPFLAGS=-g -DUSE_EXT_PTR=1 -D_R_=1 -pthread -I/usr/include/ggobi -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/libdrm PKG_LIBS=-lggobi -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 rggobi/src/RSCommon.h0000644000176000001440000000601511777244105014222 0ustar ripleyusers #ifndef RSCOMMON_H #define RSCOMMON_H #ifdef __cplusplus extern "C" { #endif #if defined(_S_) /* || defined(_R_) */ #ifdef _SPLUS5_ #ifdef ARGS #undef ARGS #endif #endif #include "S.h" #ifdef _SPLUS5_ #include "S_tokens.h" typedef boolean s_boolean; #endif /* End of _SPLUS5_ */ #endif #if defined(_S4_) #define vector s_object typedef s_object* USER_OBJECT_; typedef long RSInt; typedef s_boolean Rboolean; #endif #if defined _SPLUS6_ typedef s_boolean boolean; #define TRUE S_TRUE #define FALSE S_FALSE #endif #if defined(_R_) #include #include #ifdef length #undef length #endif #ifdef GET_LENGTH #undef GET_LENGTH #define GET_LENGTH(x) Rf_length(x) #endif #ifdef append #undef append #endif typedef SEXP USER_OBJECT_; typedef int RSInt; #include "Rversion.h" #if R_VERSION < R_Version(1, 2, 0) #define STRING_ELT(x,i) STRING(x)[i] #define VECTOR_ELT(x,i) VECTOR(x)[i] #define SET_STRING_ELT(x,i,v) (STRING(x)[i]=(v)) #define SET_VECTOR_ELT(x,i,v) (VECTOR(x)[i]=(v)) #define SETCAR(x,v) (CAR(x) = v) #else typedef Rboolean boolean; #endif #endif #if defined(_S4_) /* redefine vector and declare routines with S_evaluator */ #ifdef vector #undef vector #endif #define COPY_TO_USER_STRING(a) c_s_cpy(a, S_evaluator) #define LOCAL_EVALUATOR S_EVALUATOR #define CREATE_FUNCTION_CALL(name, argList) alcf(name, argList, S_evaluator) #define CREATE_STRING_VECTOR(a) STRING_VECTOR(a, S_evaluator) #define NULL_USER_OBJECT S_void /* This is to keep R happy until it moves to char ** rather than SEXP * for character vectors. */ #define CHAR_DEREF(x) (x) #ifdef PROTECT #undef PROTECT #endif #define PROTECT(x) (x) /**/ #define UNPROTECT(x) /**/ /* Note that this will override the one in S.h which is for S4, not S3, style classes. */ #if defined(SET_CLASS) #undef SET_CLASS #endif #define SET_CLASS(obj,classname) set_attr((obj), "class", (classname), S_evaluator) #if defined(GET_CLASS) #undef GET_CLASS #endif #define GET_CLASS(x) GET_ATTR((x), "class") #define STRING_ELT(x,i) CHARACTER_DATA(x)[i] #define VECTOR_ELT(x,i) LIST_POINTER(x)[i] #define SET_VECTOR_ELT(v, pos, val) LIST_POINTER((v))[(pos)]=(val) #define SET_STRING_ELT(v, pos, val) CHARACTER_DATA((v))[(pos)]=(val) #endif /* end of this S4 */ #if defined(_R_) #define CHAR_DEREF(x) CHAR((x)) /* SET_CLASS and SET_NAMES have been moved to Rdefines.h in the R distribution.*/ #endif /* of defined(_R_) */ #if defined(_Octave_) #include extern char error_buf[]; #define PROBLEM sprintf(error_buf, #define ERROR ); error(error_buf) #define STRING_VALUE(a) a.all_strings()[0].c_str() #define GET_LENGTH(a) getLength(a) #define LOCAL_EVALUATOR /**/ #define COPY_TO_USER_STRING(a) strdup(a) /*XXX*/ #endif /* end of defined(_Octave_)*/ #ifdef __cplusplus } #endif #endif /* end of RSCOMMON_H*/ rggobi/src/smooth.c0000644000176000001440000000603611777244105014034 0ustar ripleyusers/* Provides a mechanism for invoking an R-level function for performing the smoothing of a pair of variables and returning a single vector of numbers for the smoothed y. The function can be specified programmatically, allowing the user to experiment with different implementations. The function is called with thre arguments - x, y and window width and is expected to return a Numeric vector with the same length as each of x and y. */ #include "RSGGobi.h" #include "RSEval.h" #include #include "vars.h" USER_OBJECT_ RS_smoothFunction = NULL; USER_OBJECT_ RS_GGOBI(variableToRS)(int index, ggobid *gg); /** Computes the smoothed values for the y variable for the bivariate X and Y identified by column index for the data set in ggobi. This calls the R/S function currently registered in the variable RS_smoothFunction with three arguments: the numeric vectors x & y the desired window width as specified by the the argument `width'. */ double * RS_GGOBI(smooth)(int x_index, int y_index, double width, ggobid *gg) { double *values; USER_OBJECT_ vals, tmp; USER_OBJECT_ e; if(RS_smoothFunction == NULL || RS_smoothFunction == R_UnboundValue) return(NULL); e = allocVector(LANGSXP, 4); PROTECT(e); SETCAR(e, RS_smoothFunction); SETCAR(CDR(e), RS_GGOBI(variableToRS)(x_index, gg)); SETCAR(CDR(CDR(e)), RS_GGOBI(variableToRS)(y_index, gg)); tmp = NEW_NUMERIC(1); NUMERIC_DATA(tmp)[0] = width; SETCAR(CDR(CDR(CDR(e))), tmp); vals = eval(e, R_GlobalEnv); PROTECT(vals); /* PrintValue(vals); */ values = asCArray(vals, double, asCNumeric); UNPROTECT(2); return(values); } /* Creates Note that we could use the conversion used by the .C() routine to convert the objects in both directions. */ USER_OBJECT_ RS_GGOBI(variableToRS)(gint index, ggobid *gg) { GGobiData *d = NULL; gint n, i; USER_OBJECT_ obj; if (g_slist_length (gg->d) == 1) d = (GGobiData *) g_slist_nth_data (gg->d, 0); else return(NULL_USER_OBJECT); n = d->nrows; PROTECT(obj = NEW_NUMERIC(n)); for(i = 0 ; i < n ; i++) { NUMERIC_DATA(obj)[i] = d->raw.vals[index][i]; } UNPROTECT(1); return (obj); } USER_OBJECT_ RS_GGOBI(getSmoothFunction)() { USER_OBJECT_ ans; if(RS_smoothFunction == NULL) ans = NULL_USER_OBJECT; else ans = RS_smoothFunction; return(ans); } USER_OBJECT_ RS_GGOBI(setSmoothFunction)(USER_OBJECT_ func) { USER_OBJECT_ old; old = RS_smoothFunction; if(old != NULL) R_ReleaseObject(RS_smoothFunction); else old = NULL_USER_OBJECT; RS_smoothFunction = func; R_PreserveObject(RS_smoothFunction); return(old); } /* Replaces the smoother callback in Ggobi that is invoked when the user drags the window width slider. Because of the way we link R.so with libGGobi.so, we get to slide this ahead of the other one rather than having to register different callbacks, etc. */ void width_cb (GtkAdjustment *adj, ggobid *gg) { RS_GGOBI(smooth)(0,1, adj->value, gg); } rggobi/src/brush.c0000644000176000001440000000656211777244105013652 0ustar ripleyusers#include "RSGGobi.h" #include #include "vars.h" USER_OBJECT_ RS_GGOBI(setBrushSize)(USER_OBJECT_ dims, USER_OBJECT_ ggobiId) { ggobid *gg; GGobiData *d = NULL; gint wd, ht; USER_OBJECT_ ans; gg = toGGobi(ggobiId); /*d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg;*/ if(d) { GGOBI(getBrushSize(&wd, &ht, gg)); /* We skip the setting if these values are both -1. Allows us to set or get with one function. */ if(INTEGER_DATA(dims)[0] > -1 && INTEGER_DATA(dims)[1] > -1) GGOBI(setBrushSize(INTEGER_DATA(dims)[0], INTEGER_DATA(dims)[1], gg)); ans = NEW_INTEGER(2); INTEGER_DATA(ans)[0] = wd; INTEGER_DATA(ans)[1] = ht; /* experiments */ brush_reset(gg->current_display, 0); /* displays_plot (NULL, FULL, gg); */ gdk_flush(); } else ans = NULL_USER_OBJECT; return(ans); } USER_OBJECT_ RS_GGOBI(setBrushLocation)(USER_OBJECT_ loc, USER_OBJECT_ datasetId) { ggobid *gg; GGobiData *d; USER_OBJECT_ ans; d = toData(datasetId); g_return_val_if_fail(GGOBI_IS_DATA(d), NULL_USER_OBJECT); gg = d->gg; if(d) { gint xx, yy; GGOBI(getBrushLocation (&xx, &yy, gg)); if(INTEGER_DATA(loc)[0] > -1 && INTEGER_DATA(loc)[1] > -1) GGOBI(setBrushLocation(INTEGER_DATA(loc)[0], INTEGER_DATA(loc)[1], gg)); ans = NEW_INTEGER(2); INTEGER_DATA(ans)[0] = xx; INTEGER_DATA(ans)[1] = yy; gdk_flush(); } else ans = NULL_USER_OBJECT; return(ans); } USER_OBJECT_ RS_GGOBI(setBrushColor)(USER_OBJECT_ cid, USER_OBJECT_ ggobiId) { USER_OBJECT_ ans = NULL_USER_OBJECT; ggobid *gg = toGGobi(ggobiId); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(gg) { ans = RS_GGOBI(getBrushColor)(ggobiId); (void) GGOBI(setBrushColor)(INTEGER_DATA(cid)[0], gg); brush_reset(gg->current_display, 0); gdk_flush(); } return(ans); } USER_OBJECT_ RS_GGOBI(getBrushColor)(USER_OBJECT_ ggobiId) { ggobid *gg = toGGobi(ggobiId); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(gg) { USER_OBJECT_ ans; gint cid; cid = GGOBI(getBrushColor)(gg); PROTECT(ans = NEW_INTEGER(1)); INTEGER_DATA(ans)[0] = cid; SET_NAMES(ans, RS_INTERNAL_GGOBI(getColorName)(cid, gg)); UNPROTECT(1); return(ans); } else return(NULL); } USER_OBJECT_ RS_GGOBI(setBrushGlyph)(USER_OBJECT_ vals, USER_OBJECT_ ggobiId) { ggobid *gg = toGGobi(ggobiId); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(gg) { GGOBI(setBrushGlyph)(INTEGER_DATA(vals)[0], INTEGER_DATA(vals)[1], gg); brush_reset(gg->current_display, 0); gdk_flush(); } return(NULL_USER_OBJECT); } USER_OBJECT_ RS_GGOBI(getBrushGlyph)(USER_OBJECT_ ggobiId) { gint t, s; ggobid *gg; USER_OBJECT_ ans; gg = toGGobi(ggobiId); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(gg) { GGOBI(getBrushGlyph)(&t, &s, gg); ans = NEW_INTEGER(2); INTEGER_DATA(ans)[0] = t; INTEGER_DATA(ans)[1] = s; } else ans = NULL_USER_OBJECT; return(ans); } USER_OBJECT_ RS_INTERNAL_GGOBI(getColorName)(gint cid, ggobid *gg) { USER_OBJECT_ name; const gchar *colName; PROTECT(name = NEW_CHARACTER(1)); colName = GGOBI(getColorName)(cid, gg, false); if(colName) SET_STRING_ELT(name, 0, COPY_TO_USER_STRING(colName)); UNPROTECT(1); return(name); } rggobi/src/RSEval.c0000644000176000001440000000245011777244105013653 0ustar ripleyusers/* Contains routines for invoking R/S functions and evaluating expressions. */ #include "RSGGobi.h" #include "RSEval.h" USER_OBJECT_ RS_GGOBI(callFunction)(USER_OBJECT_ fn, USER_OBJECT_ argList) { SEXP e, ans; e = allocVector(LANGSXP, 2); SETCAR(e, fn); SETCAR(CDR(e), argList); PROTECT(e); ans = eval(e, R_GlobalEnv); UNPROTECT(1); return(ans); } USER_OBJECT_ RS_GGOBI(callUserFunction)(const char *name, USER_OBJECT_ args) { USER_OBJECT_ ans, funcName, fn; PROTECT(args); funcName = install((char*) name); fn = findVar(funcName, R_GlobalEnv); if(!isFunction(fn)) { return(R_UnboundValue); } ans = RS_GGOBI(callFunction)(fn, args); UNPROTECT(1); return(ans); } USER_OBJECT_ RS_GGOBI(callFunctionWithArgs)(USER_OBJECT_ fn, USER_OBJECT_ argList) { SEXP e, ans, tmp; int numArgs, i; numArgs = GET_LENGTH(argList); PROTECT(e = allocVector(LANGSXP, numArgs+1)); SETCAR(e, fn); tmp = e; for(i = 0; i < numArgs; i++) { SETCAR(CDR(tmp), VECTOR_ELT(argList, i)); tmp = CDR(tmp); } ans = eval(e, R_GlobalEnv); UNPROTECT(1); return(ans); } USER_OBJECT_ RS_GGOBI(findFunction)(const char *name) { SEXP funcName = install((char*) name); SEXP fn = findVar(funcName, R_GlobalEnv); if(!isFunction(fn)) { return(R_UnboundValue); } return(fn); } rggobi/src/identify.c0000644000176000001440000000315011777244105014330 0ustar ripleyusers#include "RSGGobi.h" #include #include "vars.h" #include "R.h" #include "Rinternals.h" #include "RSEval.h" /* IdentifyProc RS_INTERNAL_GGOBI(identifyHandler); */ void RS_INTERNAL_GGOBI(identifyHandler)(void *user_data, gint k, splotd *sp, GtkWidget *w, ggobid *gg); USER_OBJECT_ RS_GGOBI(setIdentifyHandler)(USER_OBJECT_ func, USER_OBJECT_ ggobiId) { ggobid *gg = toGGobi(ggobiId); USER_OBJECT_ ans = NULL_USER_OBJECT; g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); if(gg == NULL) { PROBLEM "Invalid ggobi identifier specified." ERROR; } #ifdef EXPLICIT_IDENTIFY_HANDLER if(gg->identify_handler.handler == &RS_INTERNAL_GGOBI(identifyHandler)) { ans = (USER_OBJECT_) gg->identify_handler.user_data; R_ReleaseObject(ans); } if(GET_LENGTH(func)) { /* Make certain it knows to call us. */ R_PreserveObject(func); GGOBI(setIdentifyHandler)(RS_INTERNAL_GGOBI(identifyHandler), func, gg); } else { GGOBI(setIdentifyHandler)(NULL, NULL, gg); } #endif return(ans); } /* This should pass the following values to the function: 1) the observation index 2) the plot index 3) display 4) the dataset. */ void RS_INTERNAL_GGOBI(identifyHandler)(void *user_data, gint k, splotd *sp, GtkWidget *w, ggobid *gg) { USER_OBJECT_ func = (USER_OBJECT_) user_data; USER_OBJECT_ e; USER_OBJECT_ tmp; PROTECT(e = allocVector(LANGSXP, 3)); SETCAR(e, func); SETCAR(CDR(e), tmp = NEW_INTEGER(1)); INTEGER_DATA(tmp)[0] = k; SETCAR(CDR(CDR(e)), RS_displayInstance(sp->displayptr)); eval(e, R_GlobalEnv); UNPROTECT(1); } rggobi/src/plugins.c0000644000176000001440000000332211777244105014177 0ustar ripleyusers#include "RSGGobi.h" #if 0 #include "plugin.h" USER_OBJECT_ RS_GGOBI(getPlugins)(USER_OBJECT_ gobiId) { ggobid *gg = toGGobi(gobiId); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); USER_OBJECT_ ans, names; GList *tmp; gint n, i; n = g_list_length(gg->pluginInstances); PROTECT(ans = NEW_LIST(n)); PROTECT(names = NEW_CHARACTER(n)); for(i = 0, tmp = gg->pluginInstances; i < n; tmp=tmp->next, i++) { PluginInstance *inst = tmp->data; SET_VECTOR_ELT(ans, i, toRPointer(tmp->data, "GGobiPluginInstance")); SET_STRING_ELT(names, i, COPY_TO_USER_STRING(inst->info->details->name)); } SET_NAMES(ans, names); UNPROTECT(2); return(ans); } static USER_OBJECT_ R_getPluginInfo(GGobiPluginInfo *info) { SEXP klass = MAKE_CLASS("GGobiPluginInfo"); USER_OBJECT_ ans; PROTECT(ans = NEW(klass)); SET_SLOT(ans, Rf_install("dll"), mkString(info->details->dllName)); SET_SLOT(ans, Rf_install("name"), mkString(info->details->name)); SET_SLOT(ans, Rf_install("description"), mkString(info->details->description)); SET_SLOT(ans, Rf_install("author"), mkString(info->details->author)); UNPROTECT(1); return(ans); } USER_OBJECT_ RS_GGOBI(getPluginInfo)(USER_OBJECT_ gobiId) { USER_OBJECT_ ans, names; GList *tmp, *plugins; gint n, i; plugins = GGOBI_getSessionOptions()->info->plugins; n = g_list_length(plugins); PROTECT(ans = NEW_LIST(n)); PROTECT(names = NEW_CHARACTER(n)); for(i = 0, tmp = plugins; i < n; tmp=tmp->next, i++) { GGobiPluginInfo *inst = tmp->data; SET_VECTOR_ELT(ans, i, R_getPluginInfo(inst)); SET_STRING_ELT(names, i, COPY_TO_USER_STRING(inst->details->name)); } SET_NAMES(ans, names); UNPROTECT(2); return(ans); } #endif rggobi/src/plots.c0000644000176000001440000000221311777244105013655 0ustar ripleyusers#include "RSGGobi.h" #include "vars.h" /* Gets the active plot in a GGobi context */ /* Returns a list containing the display reference and the plot index */ USER_OBJECT_ RS_GGOBI(getActivePlot)(USER_OBJECT_ ggobiId) { USER_OBJECT_ ans; ggobid *gg = toGGobi(ggobiId); g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT); PROTECT(ans = NEW_LIST(2)); SET_VECTOR_ELT(ans, 0, RS_displayInstance(gg->current_display)); SET_VECTOR_ELT(ans, 1, asRInteger(GGOBI(getCurrentPlotIndex)(gg))); UNPROTECT(1); return(ans); } /* Sets a plot as the active plot given a display and a plot index */ USER_OBJECT_ RS_GGOBI(setActivePlot)(USER_OBJECT_ s_display, USER_OBJECT_ s_plot) { USER_OBJECT_ ans = NEW_LOGICAL(1); displayd *display; splotd *sp; display = toDisplay(s_display); g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT); display_set_current(display, display->ggobi); sp = GGOBI(getPlot)(display, INTEGER_DATA(s_plot)[0]); g_return_val_if_fail(sp != NULL, NULL_USER_OBJECT); GGOBI(splot_set_current_full)(display, sp, display->ggobi); LOGICAL_DATA(ans)[0] = 1; gdk_flush(); return (ans); } rggobi/src/session.c0000644000176000001440000000354211777244105014205 0ustar ripleyusers#include "RSGGobi.h" /* R & S routines for querying the system values such as glyphs, color names, etc. in the X/GGobi session. */ USER_OBJECT_ RS_GGOBI(getGlyphTypes)() { USER_OBJECT_ ans, names; int n = -1, i; gint *gtypes; const gchar * const *gnames; gtypes = GGOBI(getGlyphTypes)(&n); gnames = GGOBI(getGlyphTypeNames)(&n); PROTECT(ans = NEW_INTEGER(n)); PROTECT(names = NEW_CHARACTER(n)); for(i = 0; i < n; i++) { INTEGER_DATA(ans)[i] = gtypes[i]; SET_STRING_ELT(names, i, COPY_TO_USER_STRING(gnames[i])); } SET_NAMES(ans, names); UNPROTECT(2); return(ans); } USER_OBJECT_ RS_GGOBI(getGlyphSizes)() { int i; USER_OBJECT_ ans; PROTECT(ans = NEW_INTEGER(NGLYPHSIZES+1)); for(i = 0; i <= NGLYPHSIZES; i++) INTEGER_DATA(ans)[i] = i; UNPROTECT(1); return(ans); } USER_OBJECT_ RS_GGOBI(getVersionInfo)() { USER_OBJECT_ ans, tmp; const int *versionNumbers; int i; PROTECT(ans = NEW_LIST(3)); SET_VECTOR_ELT(ans, 0, tmp = NEW_CHARACTER(1)); SET_STRING_ELT(tmp, 0, COPY_TO_USER_STRING(GGOBI(getVersionDate)())); SET_VECTOR_ELT(ans, 2, tmp = NEW_CHARACTER(1)); SET_STRING_ELT(tmp, 0, COPY_TO_USER_STRING(GGOBI(getVersionString)())); SET_VECTOR_ELT(ans, 1, tmp = NEW_INTEGER(3)); versionNumbers = GGOBI(getVersionNumbers)(); for(i = 0; i < 3; i++) { INTEGER_DATA(tmp)[i] = versionNumbers[i]; } UNPROTECT(1); return(ans); } USER_OBJECT_ RS_GGOBI(getDataModes)() { USER_OBJECT_ ans, names; const gchar * const *modeNames; int n, i; modeNames = GGOBI(getDataModeNames)(&n); PROTECT(ans = NEW_INTEGER(n)); PROTECT(names = NEW_CHARACTER(n)); for(i = 0; i < n; i++) { INTEGER_DATA(ans)[i] = i; SET_STRING_ELT(names, i, COPY_TO_USER_STRING(modeNames[i])); } if(modeNames) g_free((gchar *)modeNames); SET_NAMES(ans, names); UNPROTECT(2); return(ans); } rggobi/test/0000755000176000001440000000000011772563330012541 5ustar ripleyusersrggobi/test/next-version/0000755000176000001440000000000011772563330015202 5ustar ripleyusersrggobi/test/next-version/callbacks.r0000644000176000001440000000114011772563330017300 0ustar ripleyuserslibrary(Rggobi) data(mtcars) ggobi(mtcars) # This is temporary until we put the class on the # display reference when we create it. d = getDisplays.ggobi()[[1]] gtkAddCallback(d$ref, "tour_step", function(dpy, tour, i, gg, ...){ print(i); print(tour); print(gg)}, object = FALSE) library(RGtk) library(Rggobi) data(mtcars) gg = ggobi(mtcars) gg$AddCallback("identify-point", function(gg, sp, id, d) { if(id > -1) print (getRowNames.ggobi(d)[id+1]); } ) library(Rggobi) library(RGtk) data(mtcars) g=ggobi(mtcars) unclass(g)$ref$AddCallback("brush-motion", function(...) cat("Okay\n")) rggobi/test/next-version/gui2.r0000644000176000001440000000412011772563330016230 0ustar ripleyusersgui2 = function(dataset, viewMode = "Brush") { library(Rggobi) if(missing(dataset)) { data(mtcars) dataset = mtcars } g = ggobi(dataset) # , args = c("--sync", "--g-fatal-warnings")) library(RGtk) tbl = gtkTable(3,2, TRUE) p1 = scatterplot.ggobi(1,2) class(p1$ref) = gtkObjectGetClasses(p1$ref, FALSE) k = ncol(g[[1]]) p2 = scatterplot.ggobi(k-1,k) class(p2$ref) = gtkObjectGetClasses(p2$ref, FALSE) getDisplayWindow.ggobi(p1)$Hide() getDisplayWindow.ggobi(p2)$Hide() if(TRUE) { box = gtkHBox() tbl$Attach(box, 0, 1, 0, 1) # Just want the plot, no rulers, menu, etc. tmp = p1$ref$GetChildren()[[2]]$GetChildren()[[3]] gtkWidgetReparent(tmp, box) tbl$Attach(gtkButton("B"), 1, 2, 1, 2) box = gtkHBox() tbl$Attach(box, 0, 1, 2, 3) # Here we put the display into the table, menus, rulers and all. gtkWidgetReparent(p2$ref, box) win = gtkWindow() # If we don't create the outer display # then we had better make certain there is enough space # in the window before we add the table to the window. # Otherwise we will get a warning about the rulers. win$SetUsize(400,400) win$Add(tbl) } # getDisplayWindow.ggobi(p1)$Destroy() # getDisplayWindow.ggobi(p2)$Destroy() # Done at end so that we don't get errors/warnings # about size issues. #p1$ShowAll(); p2$ShowAll() win$ShowAll() # Linking and brushing work fine from regular displays, i.e. # actions in the regular display are linked to the other embedded # displays. # # Making one of the embedded displays active # # but there is no ViewMode menu items or accelerator keys # for the modes. # # We can use setMode.ggobi() to change the mode. # Identify works fine for the embedded plots/displays. # Brush however does not. It displays the brush, but as one # moves it, the points are not colored. # Interestingly, the number of points under the brush is displayed # and updated. # # There is no connection with the control panel. # setActivePlot.ggobi(2) setMode.ggobi(viewMode) unclass(g)$ref$AddCallback("destroy", function(...) cat("Closing GGobi\n")) list(ggobi= g, table =tbl) } rggobi/test/next-version/gui.r0000644000176000001440000000337611772563330016162 0ustar ripleyuserslibrary(Rggobi) data(mtcars) g = ggobi(mtcars) # , args = c("--sync", "--g-fatal-warnings")) library(RGtk) if(FALSE) { dpy = .GGobiCall("createDisplay", TRUE, as.integer(0), .gobi = g) class(dpy) = gtkObjectGetClasses(dpy, FALSE) dpy$Show() } else dpy = NULL tbl = gtkTable(3,2, TRUE) #XXX These embedded displays don't have a name/label in the display tree. p1 = .GGobiCall("createScatterPlot", as.integer(100, 100), dpy, .gobi = g) class(p1) = gtkObjectGetClasses(p1, FALSE) p2 = .GGobiCall("createScatterPlot", as.integer(100, 100), dpy, .gobi = g) class(p2) = gtkObjectGetClasses(p2, FALSE) if(TRUE) { tbl$Attach(p1, 0, 1, 0, 1) tbl$Attach(gtkButton("B"), 1, 2, 1, 2) tbl$Attach(p2, 0, 1, 2, 3) win = gtkWindow() # If we don't create the outer display # then we had better make certain there is enough space # in the window before we add the table to the window. # Otherwise we will get a warning about the rulers. win$SetUsize(400,400) if(is.null(dpy)) { win$Add(tbl) } else { dpy$Add(tbl) win$Add(dpy) } } # Done at end so that we don't get errors/warnings # about size issues. p1$ShowAll(); p2$ShowAll() # Linking and brushing work fine from regular displays, i.e. # actions in the regular display are linked to the other embedded # displays. # # Making one of the embedded displays active # # but there is no ViewMode menu items or accelerator keys # for the modes. # # We can use setMode.ggobi() to change the mode. # Identify works fine for the embedded plots/displays. # Brush however does not. It displays the brush, but as one # moves it, the points are not colored. # Interestingly, the number of points under the brush is displayed # and updated. # # There is no connection with the control panel. # setMode.ggobi("Identify") rggobi/test/next-version/plugin-radial.r0000644000176000001440000000152611772563330020121 0ustar ripleyusers# Run from $GGOBI_HOME for the moment. library(Rggobi) # init.ggobi(c("Rggobi", "--plugin=plugins/GraphLayout/plugin.xml")) g = ggobi("~/Projects/ggobi/ggobi/data/snetwork.xml", args = "--plugin=plugins/GraphLayout/plugin.xml", "--plugin=plugins/GraphAction/plugin.xml") info = getPluginInfo.ggobi()$GraphLayout dll = dyn.load(paste(info@dll, .Platform$dynlib.ext, sep="")) #g = ggobi("~/Projects/ggobi/ggobi/data/snetwork.xml") inst = g$getPlugins()$GraphLayout # .Call("S_radial_cb", inst, as.integer(-1), unclass(g[[1]])$data, unclass(g[[2]])$data, getDisplays.ggobi()[[1]], PACKAGE = dll) fun = getNativeSymbolInfo("do_radial_plugin", PACKAGE="GraphLayout")$address .Call("S_radial_cb", inst, as.integer(-1), unclass(g[[1]])$data, unclass(g[[2]])$data, getDisplays.ggobi()[[1]], fun, PACKAGE = "Rggobi") rggobi/test/next-version/edges-all.rtest0000644000176000001440000001245511772563330020131 0ustar ripleyusers#---------------------------------------------------------------------- # Example 1 #---------------------------------------------------------------------- x <- matrix(c(1,2,1, 1,2,2), 3, 2, dimnames = list(letters[1:3], c("X", "Y"))) gg <- ggobi(x) # A simple way of adding edges, especially when the # number of edges = the number of points. It just adds the edges # to the dataset that already exists in ggobi. Notice that the # argument 'edgeset' refers to the dataset to which the edges # are going to be added. e1 <- rbind(c("a", "b"), c("b", "c"), c("a","c")) gg$setEdges(e1, edgeset=gg[[1]]) # Another way of adding edges, constructing a new dataset in ggobi # and adding the edges to that second dataset. (Since the second # dataset has no variables, it doesn't appear in the variable # selection panel. It does, however, show up in the variable # manipulation table.) gg$createEdgeData(2, name="edges") e2 <- rbind(c("a", "b"), c("b", "c")) gg$setEdges(e2, edgeset = gg[[2]]) #---------------------------------------------------------------------- # Example 2 #---------------------------------------------------------------------- #. two datasets, add edges to the second one x <- matrix(c(1,2,1,0, 1,2,2,3, 1,4,2,0), 4, 3, dimnames = list(letters[1:4], c("X", "Y", "Z"))) gg <- ggobi(x) z <- matrix(c(1,2,1, 1,2,2), 3, 2, dimnames = list(letters[10:12], c("X", "Y"))) gg$setData(z, name="z") e1 <- rbind(c("a", "b"), c("b", "c"), c("a", "d")) gg$setEdges(e1, edgeset=gg[[2]]) # Notice that after adding these edges, the data in z # correspond to the edges. Set up two scatterplots: # the data in x, with z's edges displayed # the data in z # Now brushing on the points in the z scatterplot will cause # the edges in the x scatterplot to be brushed as well. #---------------------------------------------------------------------- # Example 3 #---------------------------------------------------------------------- data(mtcars) g <- ggobi(mtcars[1:26, ], name="cars") g$setRowNames(letters) d <- createEdgeDataset.ggobi(10, name="edges") ed <- cbind(rownames(mtcars)[1:10], rownames(mtcars)[11:20]) setEdges.ggobi(ed, edgeset = d) # The correspondance between edges and nodes is determined # by the row id, which is the same as the row name by default. # In this example, however, we change the row names of the # point dataset to letters while leaving the row ids unchanged: # they're still automobile names. That's why the correspondance # between the edges and the rows works though you might think # it wouldn't. #---------------------------------------------------------------------- # Example 4 #---------------------------------------------------------------------- # Checking that 5 edges are matched, 5 not. data(mtcars) g <- ggobi(mtcars[1:26, ]) d <- createEdgeDataset.ggobi(10) ed <- cbind(c(rownames(mtcars)[1:5], letters[1:5]), rownames(mtcars)[11:20]) setEdges.ggobi(ed, edgeset = d) #---------------------------------------------------------------------- # Example 5 #---------------------------------------------------------------------- # Checking that no edges are matched. g <- ggobi(mtcars[1:26, ]) d <- createEdgeDataset.ggobi(10) ed <- cbind(letters[1:10], rownames(mtcars)[11:20]) setEdges.ggobi(ed, edgeset = d) #------------------------------------------------------------------ #------------------------------------------------------------------ #------------------------------------------------------------------ # Example A #------------------------------------------------------------------ # Simplest case: one set of points, one set of edges; no data # associated with edges. In this case, the result is a simple # 3D geometric object. # Nodes x <- matrix(c(0,0,2,1, 0,2,0,1, 0,0,0,1), 4, 3, dimnames = list(letters[1:4], c("X", "Y", "Z"))) gg <- ggobi(x) # Edges d2 <- gg$createEdgeData(6, name="edges") e2 <- rbind(c("a", "b"), c("b", "c"), c("a","c"), c("a","d"), c("b","d"), c("c","d")) gg$setEdges(e2, edgeset = d2) #------------------------------------------------------------------ # Example B #------------------------------------------------------------------ # One set of nodes, two alternative sets of edges. The Edges # menu on a scatterplot of the nodes will appear and then grow # with each subsequent edge set. Use that menu to specify which # edge set you want to see. # Nodes x <- matrix(c(0,0,1,1, 0,1,0,1), 4, 2, dimnames = list(letters[1:4], c("X", "Y"))) gg <- ggobi(x) # The first set of edges d1 <- gg$createEdgeData(4, name="edges1") e1 <- rbind(c("a", "b"), c("b", "d"), c("c","d"), c("c", "a")) gg$setEdges(e1, edgeset = d1) # The second set d2 <- gg$createEdgeData(2, name="edges2") e2 <- rbind(c("a", "d"), c("b", "c")) gg$setEdges(e2, edgeset = d2) #------------------------------------------------------------------ # Example C #------------------------------------------------------------------ # One set of nodes, one set of edges; there are variables # associated with the edges. x <- matrix(c(1,2,1,0, 1,2,2,3, 1,4,2,0), 4, 3, dimnames = list(letters[1:4], c("X", "Y", "Z"))) gg <- ggobi(x) # Add the second dataset z <- matrix(c(1,2,1, 1,2,2), 3, 2, dimnames = list(letters[10:12], c("X", "Y"))) d2 <- gg$setData(z, name="z") # Add edges to the second dataset e1 <- rbind(c("a", "b"), c("b", "c"), c("a", "d")) gg$setEdges(e1, edgeset=gg[[2]]) # or gg$setEdges(e1, edgeset=gg[["z"]]) rggobi/test/next-version/edges.rtest0000644000176000001440000000360611772563330017361 0ustar ripleyusersx <- matrix(c(1,2,1, 1,2,2), 3, 2, dimnames = list(letters[1:3], c("X", "Y"))) gg <- ggobi(x) y <- matrix(rnorm(15), 5,3, dimnames = list(letters[1:5], LETTERS[1:3])) gg$setData(y, name = "dfs") edges <- rbind(c("a", "b"), c("b", "c"), c("a", "c")) gg$setEdges(edges, edgeset = gg[[1]]) # y <- cbind(rnorm(2), rnorm(2)) x <- matrix(c(1,2,1, 1,2,2), 3, 2, dimnames = list(letters[1:3], c("X", "Y"))) x <- matrix(c(1,2,1, 1,2,2), 3, 2, dimnames = list(c("foo", "bar", "gaga"), c("X", "Y"))) edges <- rbind(c("foo", "bar"), c("bar", "gaga")) gg <- ggobi(x, id = c("foo", "bar", "gaga")) # Won't open ggobi, says this: Error in ggobi(x, id = c("foo", "bar", "gaga")) : unused argument(s) (id ...) setEdges.ggobi(edges) # Different test! g <- ggobi(mtcars[1:26, ]) g$setRowNames(letters) d <- createEdgeDataset.ggobi(10) ed <- cbind(rownames(mtcars)[1:10], rownames(mtcars)[11:20]) setEdges.ggobi(ed, edgeset = d) # Checking that 5 edges are matched, 5 not. g <- ggobi(mtcars[1:26, ]) d <- createEdgeDataset.ggobi(10) ed <- cbind(c(rownames(mtcars)[1:5], letters[1:5]), rownames(mtcars)[11:20]) setEdges.ggobi(ed, append = FALSE, .data = d) # Checking that no edges are matched. g <- ggobi(mtcars[1:26, ]) d <- createEdgeDataset.ggobi(10) ed <- cbind(letters[1:10], rownames(mtcars)[11:20]) setEdges.ggobi(ed, append = FALSE, .data = d) x <- matrix(c(1,2,1, 1,2,2), 3, 2, dimnames = list(c("foo", "bar", "gaga"), c("X", "Y"))) gg <- ggobi(x) edges <- rbind(c("foo", "bar"), c("bar", "gaga"), c("foo","gaga")) nodes = matrix(rnorm(20), 10, 2) rownames(nodes) <- letters[1:nrow(nodes)] e = cbind(c("a", "b", "c", "d"), sample(letters[1:10], 4)) colnames(e) = c("src", "dest") e2 = cbind(c("a", "b", "c", "d"), sample(letters[1:10], 4)) colnames(e2) = c("src", "dest") g = ggobi(nodes) d2 = g$createEdgeData(nrow(e), name = "edges") g$setEdges(e, edgeset = d2) g$setEdges(e2, edgeset = d2) rggobi/test/next-version/plot-layout.r0000644000176000001440000000142711772563330017662 0ustar ripleyusersplot4 <- ashDescription("tars2") plot5 <- scatmatrixDescription("tars1", "tars2", "head") plot6 <- parallelCoordDescription("tars1", "tars2", "head") g <- ggobi("../ggobi/data/flea.xml") cl <- gtkCells(2,2)[-3,] cl[3,1] <- 1 plotLayout(plot4, plot5, plot6, mfrow=c(2,2), cells=t(cl)) plot4 <- scatterplotDescription("tars1", "tars2") plot5 <- scatmatrixDescription("tars1", "tars2", "head") g <- ggobi("../ggobi/data/flea.xml") dpy <- plotLayout(mfrow=c(3,2)) plotLayout(plot4, plot5, cells=t(gtkCells(3,2)[c(1,4),]), display = dpy) plot4 <- scatterplotDescription("tars1", "tars2") plot5 <- scatmatrixDescription("tars1", "tars2", "head") g <- ggobi("../ggobi/data/flea.xml") dpy <- plotLayout(plot4, mfrow=c(3,2)) plotLayout(plot5, cells=t(gtkCells(3,2)[c(1,4),]), display = dpy) rggobi/test/glyphs.rtest0000644000176000001440000000163111772563330015133 0ustar ripleyusers test_glyph_manip <- function() { g <- ggobi(mtcars) on.exit(close(g)) x <- g[1] assert_error(shadowed(x) <- shadowed(x)) assert_error(glyph_colour(x) <- glyph_colour(x)) assert_error(glyph_type(x) <- glyph_type(x)) assert_error(glyph_size(x) <- glyph_size(x)) shadowed(x) <- TRUE assert_equal(rep(TRUE, nrow(x)), shadowed(x)) shadowed(x) <- FALSE assert_equal(rep(FALSE, nrow(x)), shadowed(x)) excluded(x) <- TRUE assert_equal(rep(TRUE, nrow(x)), excluded(x)) excluded(x) <- FALSE assert_equal(rep(FALSE, nrow(x)), excluded(x)) glyph_size(x) <- 1:3 assert_equal(rep(1:3, length=nrow(x)), glyph_size(x)) glyph_type(x) <- 1:3 assert_equal(rep(1:3, length=nrow(x)), glyph_type(x)) glyph_colour(x) <- 1:3 assert_equal(rep(1:3, length=nrow(x)), glyph_colour(x)) } #assert_equal(mtcars, getData.ggobi(x)) #dim(x) #assert_no_error(rownames(x) <- rownames(x)) #assert_no_error(ids(x) <- ids(x) ) rggobi/test/test.r0000644000176000001440000000005311772563330013701 0ustar ripleyuserslibrary(rggobi) library(butler) test_all() rggobi/test/data.rtest0000644000176000001440000000061111772563330014533 0ustar ripleyuserstest_load_frame <- function() { check_data <- function(dataset) { g <- ggobi() g[[1]] <- dataset assert_equal(dataset, as.data.frame(g[[1]])) close(g) } lapply(list(mtcars), check_data) } test_load_file <- function() { files <- dir(ggobi_find_file("data"), "\.xml$", full=TRUE) lapply(files, function(x) { assert_error({ g <- ggobi(x) close(g) print(x) }) }) } rggobi/.gitignore0000644000176000001440000000116211772574100013547 0ustar ripleyusers/.Rhistory /aclocal.m4 /autom4te.cache/output.0 /autom4te.cache/output.1 /autom4te.cache/output.2 /autom4te.cache/requests /autom4te.cache/traces.0 /autom4te.cache/traces.1 /autom4te.cache/traces.2 /config.log /config.status /configure /src/Makevars /src/RSEval.o /src/brush.o /src/colorSchemes.o /src/conversion.o /src/data.o /src/dataset.o /src/display.o /src/displays.o /src/edges.o /src/ggobi.o /src/identify.o /src/init.o /src/io.o /src/keyHandlers.o /src/longitudinal.o /src/modes.o /src/plot.o /src/plots.o /src/plugins.o /src/print.o /src/rggobi.so /src/session.o /src/smooth.o /src/symbols.rds /src/ui.o /src/utils.o rggobi/configure.win0000644000176000001440000000000011772563330014250 0ustar ripleyusersrggobi/demo/0000755000176000001440000000000011772563330012506 5ustar ripleyusersrggobi/demo/ball.R0000644000176000001440000000404311772563330013544 0ustar ripleyuserslibrary(rggobi) library(RGtk2) pong <- function() { x <- 100 lives <- 3 deaths <- 0 box <- as.data.frame(rbind(cbind(1:x, 0), cbind(1:x, x), cbind(x, 1:x), cbind(0, 1:x), c(x/2, x/2), cbind(-20, seq(1,lives*4, by=4)))) box <- cbind(box, 0) # Unfortunately, lives cannot be a variable since ggobi_data_set_variables # can't handle categorical data #calc_lives <- function() { # life_fact <- as.factor(c(rep("Lives", lives - deaths), rep("Deaths", deaths), # rep(NA, 4*x - lives - deaths + 1))) # levels(life_fact) <- c("Lives", "Deaths") # life_fact #} #life <- calc_lives() #box <- cbind(box, life) colnames(box) <- c("X", "Y", "Z") gg <- ggobi(box) d <- gg[1] glyph_color(d) <- c(rep(c(1,1,1,8), x), rep(3, lives+1)) shadowed(d) <- c(rep(FALSE, 3*x), rep(TRUE, x), FALSE, rep(FALSE, lives)) v <- c(.7, 1) b <- nrow(d) - lives blocked <- FALSE update_cb <- function() { if (blocked) return(TRUE) ball <- d[b,c(1,2)] if (ball[1] >= x) v[1] <<- -v[1] if (ball[2] <= 0 || ball[2] >= x) v[2] <<- -v[2] if (ball[1] <= 0) { box[b,c(1,2)] <- c(x/2,x/2) v <<- c(.7, 1) blocked <<- TRUE if (lives > deaths) { dialog <- gtkMessageDialog(NULL, 0, "info", "ok", "Sorry, you missed:", lives-deaths, "lives left") dialog$run() } else { dialog <- gtkMessageDialog(NULL, 0, "question", "yes-no", "Sorry, game over: play again?") if (dialog$run() == GtkResponseType["yes"]) pong() } dialog$destroy() blocked <<- FALSE if (deaths == lives) return(FALSE); deaths <<- deaths + 1 shadowed(d) <- c(rep(FALSE, 3*x), rep(TRUE, x), FALSE, rep(FALSE, lives - deaths), rep(TRUE, deaths)) #ggobi_data_set_variables(d, calc_lives(), "Lives") } else box[b,c(1,2)] <- ball + v d[,"X"] <- box[,1] d[,"Y"] <- box[,2] return(TRUE) } class(gg) <- "GObject" gSignalConnect(gg, "identify-point", function(gg, plot, id, data) { if ((id+1) == b && v[1] < 0) v <<- v*c(-1,1) }) gTimeoutAdd(2, update_cb) } pong() rggobi/demo/00Index0000644000176000001440000000006011772563330013634 0ustar ripleyusersball A pong game written with rggobi and RGtk2 rggobi/DESCRIPTION0000644000176000001440000000165511777507413013304 0ustar ripleyusersPackage: rggobi Version: 2.1.19 Title: Interface between R and GGobi Author: Duncan Temple Lang , Debby Swayne , Hadley Wickham , Michael Lawrence Depends: R (>= 2.5.1) Suggests: reshape, graph, nlme Imports: RGtk2, utils, methods SystemRequirements: GGobi Maintainer: Hadley Wickham Description: The rggobi package provides a command-line interface to GGobi, an interactive and dynamic graphics package. Rggobi complements GGobi's graphical user interface, providing a way to fluidly transition between analysis and exploration, as well as automating common tasks. License: BSD LazyData: true URL: http://www.ggobi.org/rggobi Acknowledgements: Di Cook, Nicholas Lewin-Koh, Xuejing Chen. Packaged: 2012-07-11 09:32:53 UTC; larman Repository: CRAN Date/Publication: 2012-07-12 08:47:07 rggobi/configure0000755000176000001440000026130611772563476013514 0ustar ripleyusers#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="src/brush.c" ac_subst_vars='LTLIBOBJS LIBOBJS GGOBI_LIBS GGOBI_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_ggobi ' ac_precious_vars='build_alias host_alias target_alias PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR GGOBI_CFLAGS GGOBI_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) Specify where ggobi pkgconfig file is located Some influential environment variables: PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path GGOBI_CFLAGS C compiler flags for GGOBI, overriding pkg-config GGOBI_LIBS linker flags for GGOBI, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check whether --with-ggobi was given. if test "${with_ggobi+set}" = set; then : withval=$with_ggobi; GGOBI_ROOT=$withval fi if ! test -z "${GGOBI_ROOT}"; then export PKG_CONFIG_PATH=${GGOBI_ROOT}:$PKG_CONFIG_PATH fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GGOBI" >&5 $as_echo_n "checking for GGOBI... " >&6; } if test -n "$GGOBI_CFLAGS"; then pkg_cv_GGOBI_CFLAGS="$GGOBI_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ggobi >= 2.1.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "ggobi >= 2.1.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GGOBI_CFLAGS=`$PKG_CONFIG --cflags "ggobi >= 2.1.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GGOBI_LIBS"; then pkg_cv_GGOBI_LIBS="$GGOBI_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ggobi >= 2.1.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "ggobi >= 2.1.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GGOBI_LIBS=`$PKG_CONFIG --libs "ggobi >= 2.1.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GGOBI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ggobi >= 2.1.6" 2>&1` else GGOBI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ggobi >= 2.1.6" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GGOBI_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (ggobi >= 2.1.6) were not met: $GGOBI_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GGOBI_CFLAGS and GGOBI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GGOBI_CFLAGS and GGOBI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GGOBI_CFLAGS=$pkg_cv_GGOBI_CFLAGS GGOBI_LIBS=$pkg_cv_GGOBI_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi ac_config_files="$ac_config_files src/Makevars" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/Makevars") CONFIG_FILES="$CONFIG_FILES src/Makevars" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi