text_combined: gavin simpson gavinsimpsonuclacuk dear list writing custom panel function xyplot method plot results procrustes analysis vegan package trouble getting call panelarrows work wish conditioning attached file contains function definitions xyplot method custom panel prepanel functions using example using data functions vegan package illustrates problem requirevegan requirelattice datavarespec varedist vegdistwisconsinvarespec librarymass isomds mdsnull isomdsvaredist tol1e7 mdsalt isomdsvaredist initmdsvaredist maxit200 tol1e7 vareproc procrustesmdsalt mdsnull vareproc groups factorcrep116 rep28 labels cgrazedungrazed sourcexyplotprocrustesr xyplotvareproc x groups data asdataframegroups kind 1 resulting plot many arrows panel points multiple arrows emanating panelprocrustes defined panelprocrustes functionx kind choices rotation x arcol length 005 tp trellisparget ifmissingarcol arcol tpsuperposesymbolcol1 ifkind 1 panelablineh 0 lty dashed panelablinev 0 lty dashed ifncolrotation 2 sometimes rotation11 22e16 one rotation11 minrotation11 1 panelabline0 tanacosrotation1 1 lty solid panelabline0 1tanacosrotation1 1 lty solid else cbindxy trotation k seq_lenncoly tmp matrix0 nrow 2 ncol ncoly tmp k rangey k tmp tmp rotation panellinestmp choices lty 1 paneltexttmp2 choices1 tmp2 choices2 ascharacterk panelxyplotx type p problem panelarrowsx0 x y0 x1 x1 y1 x2 length length col arcol ends last else ifkind 2 quant quantiley panelxyplotx type h panelablineh quant24 lty c212 bit trouble call panelarrows plotting points line panelarrows call works fine conditioning im getting panelarrows call condition correctly question one tell panelarrows plot arrows relevant conditioning variable tia g dr gavin simpson 44 020 7679 0522 ecrc ucl geography f 44 020 7679 0565 pearson building e gavinsimpsonatnospamuclacuk gower street london w httpwwwuclacukucfagls uk wc1e 6bt w httpwwwfreshwatersorguk thu 07 aug 2008 155516 0100 r panelarrows problem custom panel function