Home

Drift fence simulator:

image

Contents

1. Fasz eso s bs 4 and loads the layout movement summary into the object raw params in R Data Editor id fenceLayout movementId var 5 12p5mgrid 25mgrid SOmgrid E 12pSmgrid 100mgrid 3 12pS5mgrid 15 S5O0mgrid 16 100mgrid 17 12pSmgrid i8 fis 25mgria H Ble Ble amp ti s e w e5l o i i i i i 1 Smgrid d 3 5 and loads the sample of walk outcomes for each movement type into the object raw walk in R Data Editor 4 1 2 ass is Tan ass is aos aas Ts Taa as is aos 25 25 25 25 25 js 8 593037 sT 42991 25 25 25 14403 jis soz 25 25 25 25 25 25 25 25 25 25 Ooo Ooo Oo Oo Ooo 6 643171 248 2339 4 701732 i9 10094 2 478290 87 6442 2 984028 85 07781 4 224456 101 9052 NENNEN m oad mmu L L L L L nans jas 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 It is recommended that you use this command when first loading new data into an R Workspace to ensure all the tables of data are loaded and are from the same simulation 5 1 3 Summarising data The following are examples of functions that summarise the various datatables To summarise details about the movement types si
2. i2pSmgrid is 10512 5 10012 5 10019 5 i0019 85 10200 0 9907 0 10207 0 and loads the fenceresult into the object raw fenceresult in R Data Editor ai zz Js jo as z2 s fe o J ERN Js qo h J T asa jez s fpes jo J ass z22 fs fa h 24622 2 h J y zaz jez ds fa deo 0j asa jez s fe fo o o S aso z22 fs h Sf o o E asso J22 fs fa ho KA lm lm lam lam lom lom T eo H 2 fe f boundsType boundsY boundsWidth boundsHeight reps samples vars 800 E T ozot H o H 1020 and loads the movement descriptions into the object raw movement in R Data Editor O ereeo2 s Pa eneeo fs 25 A 25 5 laplace 0 2 1 oe e BS r C Blanes T EU Tanez 020 Te e a az CR aes EEG eio 5 ps S NES o SS a pauaeo d fs fo 15 laplace 0 10 4 100 xr panas o 3o p m su seos so Eis aepiece 0 90 1 1 2o zo fiamaso 30 s s S Enjn penesos 1 A laplace 0 30 5 50 EE uuum 5 ho Fass epiace 0 60 o o m rae ze nee e so 1 O Ezrjzr epiece 0 60 1 es
3. median offset uq offset max offset var offset nrow 1 ncol 12 put the output into the workspace as a data frame df walk summary lt lt as data frame out stringsAsFactors FALSE You apply this function to the raw walk data to generate the df walk summary dataframe by using the following command gt summ walk The format of the summary file df walk summary is shown below Data Editor movement Id angles stepdist maxdist min offset lq offset mean offset median offset uq offset max offset laplace 1 10 9 72201745958851 9 97318394297008 9 97861695942197 9 98574502866979 9 99275285640402 9 99941433515276 laplace 10 9 88389307169956 9 9972310178578 9 9968207122673 9 99932342200257 9 99989968432127 9 99999999990574 laplace 25 24 1770842549091 24 8443903032788 24 8769729168341 24 9122336589141 24 9488143891557 24 9939172586358 laplace 25 24 7786710655721 24 9711862408957 24 976367853621 24 986928227413 24 9939957846126 24 9999002327895 laplace 0 10 10 5 35275310592989 9 35334661994547 9 5096311777374 9 66899778163072 9 82923303337243 9 98245102243317 laplace 0 10 10 8 68333668607507 9 92347345996754 9 92710035830558 9 97816296936418 9 99658941213133 9 99999980927283 laplace 0 10 25 5 79397326559818 21 3230035547928 22 0603187296353 22 8793984328045 23 8108361705995 24 7743704739979 laplace 0 10 25 16 413197259201
4. stepdist raw movement raw movement 1 move num 3 maxdist raw movement raw movement 1 move num 4 meandist as numeric walkmat move num 8 mediandist as numeric walkmat move num 9 out rbind out matrix c setup num move num fenceLayout fencelId angle stepdist maxdist meandist mediandist nreps min hits lq hits mean hits median hits uq hits max hits var hits nrow 1 ncol 17 df fence summary lt lt as data frame out stringsAsFactors FALSE You apply this function to the raw fenceresult data to generate the df fence summary object by using the following command gt summ fences The format of the summary file df fence summary is shown below Data Editor S ree Si es izpsmgrid laplace 0 2 10 9 97999099 i2psmgrid 2 laplace 0 2 1 3 97999095 12p5mgrid laplace 0 2 10 9 97999099762 12psmgrid laplace 0 2 i2psmgrid laplace 0 2 i2psmgrid laplace 0 2 i2psmgrid laplace 0 2 izpsmgria 8 laplace 0 2 izpsmgria s laplace 0 2 12p5mgrid 10 laplace 0 2 izpsmgria 11 laplace 0 2 i2p5mgria 12 laplace 0 2 izp5mgriad 15 laplace 0 2 izpsmgrid 14 laplace 0 2 izpsmgria 15 laplace 0 2 i2psmgrid laplace 0 2 12psmgrid laplace
5. 0 2 izpsmgrid 19 laplace 0 2 izpsmgrid 18 laplace 0 2 izpsmgria 21 laplace 0 2 izpsmgrid 20 laplace 0 2 izpsmgria 29 laplace 0 2 izpsmgria 22 laplace 0 2 12p5mgrid laplace 0 2 izpsmgria 24 laplace 0 2 25mgrid laplace 0 2 25mgrid laplace 0 2 10 9 97999099 8456427574 1 25mgrid 3 laplace 0 2 1 S c 8456427574 1 5 1 4 Plotting data To plot the number of fence hits that each layout scores for each maximum walk distance you need to create the plot layout summary function gt fix plot layout summary and entering the following script function S lt as matrix df layout summary names and count of fence layouts in df layout summary layouts unique s 3 nlayouts length layouts names and count of max offests in df layout summary dists unique s 6 ndists length dists for dist num in dists hue 0 plot 0 ylim c 0 max as numeric s 12 10 xlim c 0 as numeric dist num main paste Max dist dist num xlab offset ylab hits col hue for layout num in layouts hue hue 1 x lt s s 3 layout num amp s 6 dist num 7 y lt s s 3 layout num amp s 6 dist num 12 points x y col hue ypos lt max as numeric s 12 10 hue 5 legend 0 ypos layout num fill hue bty n
6. datafiles are loaded col paramsId 1 col repId lt 2 col fenceId lt 3 col hits 4 output data frame out lt matrix 0 0 10 colnames out lt c paramsId movementId fenceLayout angles stepdist maxdist meandist mediandist rep hits reps unique raw fenceresult col repId nreps length reps setups unique raw fenceresult col paramsId nsetups length setups walkmat as matrix df walk summary for setup num in setups hits vec rep 0 times nreps for i in 1 nreps hits sum raw fenceresult raw fenceresult col repId reps i amp raw fenceresult col paramsId setup num col hits mean hits mean hits vec min hits lt min hits vec max hits max hits vec var hits var hits vec quantiles hits quantile hits vec c 0 25 0 75 lq hits lt quantiles hits 1 ER median hits median hits vec uq hits quantiles hits 2 fenceLayout raw params setup num 2 move num raw params setup num 3 angle raw movement raw movement 1 move num 2 stepdist raw movement raw movement 1 move num 3 maxdist raw movement raw movement 1 move num 4 meandist lt as numeric walkmat move num 8 mediandist as numeric walkmat move num 9 EM out rbind out matrix c setup num move num fenceLayout angle stepdist maxdist meandist median
7. par ask T You apply this function to the df layout summary data to generate the plots by using the following command gt plot layout summary This generates one plot for each maximum walk distance with the x value being the realised offset and the y value the number of hits with each fence layout being plotted in a different colour 100 m walks 9 e 5 8 99 8 9 e 8 4 8 9 8 9 e ka 9 9 9 e 9 9 9 9 e T T T T T T 0 20 40 60 80 100 offset m Figure 5 1 4 1 An example of a plot showing the results for walks totalling 100m The colours represent four different fence configurations used in the simulations The X axis is the mean offset distance for a particular walk type 12 walk type simulated in this example and the Y axis is the mean number of fences hit by that walk type 5 1 5 Exporting data from R At times you may need to use the data in other packages In the following example the dataframe df walk summary is exported to a file d data walks txt as a comma delimited file This can be imported into a spreadsheet for other manipulations gt write table df walk summary file c data walks txt sep col namesz TRUE row names FALSE The data can be subdivided in R so that only a subset is exported There are a variety of options in the R manual for altering the use of the headings the data separators etc Appendix Drift fence
8. 0 10000 10007 9907 10057 9907 10107 9907 9900 9950 9907 9957 9950 9950 9957 9957 10007 9957 10057 9957 10107 9957 9907 10007 9957 10007 10000 10050 10100 10000 10050 10100 10000 10050 10100 10000 10000 10000 9900 10050 9907 10057 9950 10050 9957 10057 10050 10050 10050 9900 10100 9907 101 9950 10100 9957 101 10100 10100 10100 10007 10007 10057 10007 10107 10007 10007 10057 10107 10057 10057 10057 07 07 10107 10107 10107 10007 10057 10107 layout 100mgrid 9800 9800 9807 9807 9900 9800 9907 9807 10000 9800 10007 9807 10100 9800 10107 9807 10200 9800 10207 9807 9800 9900 9807 9907 9900 9900 9907 9907 10000 9900 10007 9907 10100 9900 10107 9907 10200 9900 10207 9907 9800 10000 9807 10007 9900 10000 9907 10007 10000 10000 10007 10007 10100 10000 10107 10007 10200 10000 10207 10007 9800 10100 9807 10107 9900 10100 9907 10107 10000 10100 10007 10107 10100 10100 10107 10107 10200 10100 10207 10107 9800 10200 9807 10207 9900 10200 9907 10207 10000 10200 10007 10207 10100 10200 10107 10207 10200 10200 10207 10207 3 2 Using the model start command and a graphic of the interface ton add e CUT uL rE ane selation 10 SMAPSHOT jer 5 032012723 PM e Jar File 1617 Lis Trap simulstion eb 5E Once you start the modelling software you need to select the parameters file to be used in the simulatio
9. 4 24 2128555778348 24 3645892749561 24 6372731006824 24 8465000396984 24 9979184942259 laplace 0 30 10 235483713583299 5 77026377676956 6 93851890000094 7 4678180571316 8 52453488520159 9 92114925597001 laplace 0 30 10 918770576224478 9 35069097472142 9 40867218385077 9 84339948196846 9 9732599204351 9 99999950290293 laplace 0 30 25 504444280364199 8 21507607391167 12 3036250845819 12 450196885525 16 6625746720745 22 9601920095729 laplace 0 30 25 28567457000584 19 2052459436937 20 9638605518733 22 1240238754521 23 8519938648038 24 9686228512249 uniform 180 10 167574146050947 1 70603204301138 2 78972079102171 2 70861339653 696 3 72457081230824 7 19750307381106 uniform 180 10 000209728505975126 4 00978457177316 6 50141655646408 7 16781484393902 9 34777519642194 9 99999864283182 uniform 180 25 13 2754419483407 0 o 0 4 o 0 0 o 7 0209024144833087 2 75419418921517 4 39114002098901 4 14087228602456 5 87247357878137 E uniform 180 25 309697572336793 6 0886519877334 10 0252555376035 9 4551013139742 13 2629055998897 23 7318585373881 To summarise details about the number of fence hits that each layout scores for each movement style in each replicate you need to create the rep layout function gt fix rep layout and entering the following script function Assumes the raw
10. 9 6 6 10 6 8 12 21 39 8 izpSmgrid laplace 0 2 10 9 9968207122673 9 99932342200257 10 13 14 6 15 21 16 3 Z5mgrid laplace 0 2 10 9 9968207122673 9 99932342200257 14 v 19 4 20 21 25 17 3 SOmgrid laplace 0 2 10 9 9968207122673 9 99932342200257 15 16 17 6 18 19 20 4 3 100mgrid laplace 0 2 10 9 9968207122673 9 99932342200257 5 5 12 6 i2 15 18 15 3 izpSmgrid laplace 0 2 25 24 6769729168341 24 9122336569141 28 30 32 4 33 35 36 11 3 25mgrid laplace 0 2 25 24 6769729166341 24 9122336569141 27 30 36 2 34 az 48 75 2 SOmgrid laplace 0 2 25 24 8769729168341 24 9122336569141 38 38 42 41 44 as 21 5 100mgrid laplace 0 2 25 24 8769729168341 24 9122336589141 38 38 40 6 a a2 45 8 8 i2pSmgrid laplace 0 2 25 24 976367853621 24 986928227413 24 27 28 28 29 32 8 5 Z5mgrid laplace 0 2 25 24 976367853621 24 986928227413 26 36 39 4 a2 46 a7 74 8 SOmgrid laplace 0 2 25 24 976367853621 24 986928227413 34 36 38 37 ar 42 11 5 100mgrid T laplace 0 2 25 24 976367853621 24 986928227413 34 35 37 35 36 45 20 5 i2pSmgrid laplace 10 10 9 5096311777374 9 66899778163072 1i ii 13 i2 15 16 5 5 25mgrid laplace 0 10 10 9 5096311777374 9 66899778163072 1i 14 16 8 16 18 25 27 7 SOmgrid laplace 10 10 9 5096311777374 9 66899778163072 5 12 14 6 17 21 21 3 To summarise details about the number of fence hits that each fence in each layout scores for each movemen
11. 982 9987 5 9975 9994 5 9982 10000 9975 10007 9982 10012 5 9975 10019 5 9982 10025 9975 10032 9982 9975 9987 5 9982 9994 5 9987 5 9987 5 9994 5 9994 5 10000 9987 5 10007 9994 5 10012 5 9987 5 10019 5 9994 5 10025 9987 5 10032 9994 5 9975 10000 9982 10007 9987 5 10000 9994 5 10007 10000 10000 10007 10007 10012 5 10000 10019 5 10007 10025 10000 10032 10007 9975 10012 5 9982 10019 5 9987 5 10012 5 9994 5 10019 5 10000 10012 5 10007 10019 5 10012 5 10012 5 10019 5 10019 5 10025 10012 5 10032 10019 5 9975 10025 9982 10032 9987 5 10025 9994 5 10032 10000 10025 10007 10032 10012 5 10025 10019 5 10032 10025 10025 10032 10032 layout 25mgrid 9950 9950 9957 9957 9975 9950 9982 9957 10000 9950 10007 9957 10025 9950 10032 9957 10050 9950 10057 9957 9950 9975 9957 9982 9975 9975 9982 9982 10000 9975 10025 9975 10050 9975 9950 10000 9975 10000 10007 9982 10032 9982 10057 9982 9957 10007 9982 10007 10000 10025 10050 10000 10025 10050 10000 10025 10050 10000 10000 10000 9950 10025 9957 10032 9975 10025 9982 10032 10025 10025 10025 9950 10050 9957 10057 9975 10050 9982 10057 10050 10050 10050 10007 10007 10032 10007 10057 10007 10007 10032 10032 10032 10057 10032 10007 10032 10057 10057 10057 10057 layout 50mgrid 9900 9900 9907 9907 9950 9900 9957 9907 10000 9900 10050 9900 10100 9900 10000 9950 10050 9950 10100 9950 9900 10000 995
12. Drift fence simulator technical specifications and user donum Versio Are simulated fen ough when studyi ids Sae nimals or do we need raps and si rches pe AN py AAS ANZ pu Wu ff YS Lex E N e 4 Contents 1 Introduction 2 Model structure 3 Running models 3 Data inputs 3 2 Using the model 4 Data output 4 Fence arrangement 4 2 Walk paths 4 3 Tabular data 4 3 1 metadata 4 3 2 fence 4 3 3 movement 4 3 4 params 4 3 5 walk 4 3 6 fenceresult 5 Data manipulation 5 Using tabular data in R 5 1 1 Establish connections between R and your data logfile 5 1 2 Loading data 5 1 3 Summarising data 5 1 4 Plotting data 5 1 5 Exporting data from R Appendices System requirements Installation 1 Introduction 2 Model structure 3 Running models 3 Data inputs The simulation is driven by one parameters file that gives the four primary types of information simulation giving the stepdist maxdist angles samples and reps parameters output giving the dir parameter where the results will be written to landscape giving the bounds describing either a circular or rectangular landscape and projection parameters and fences giving the layout parameter which names a particular fence arrangement which is followed by the coordinates of the start and end of each fence An example of a file that controls the running of a set of simulations is given in the box bel
13. ULL driver NULL t Open a database generated for SQLite ij filename the path and name of the database file if NULL a dialog will be displayed to choose the file driver an optional database driver to manage the connection if require RSQLite quietly TRUE stop Can t load the RSQLite package or one of its dependents if is null filename tryCatch filename file choose error function e dialog cancelled if is null filename return invisible NULL if file exists filename cat paste Can t find substitute filename return invisible NULL if is null driver driver dbDriver SQLite con lt dbConnect driver filename if tmdbValidate con show FALSE dbDisconnect con cat paste substitute filename is not a valid tm site database return invisible NULL 3 S lt dbListTables con if length s print Bummer Either the database can t be opened or it s empty return NULL print paste Tables paste s collapse Return the connection to the database con invisible con You can invoke this function as shown in the following examples indicating the command you enter and the response from R which lists the tables it found in your datafile gt db open This opens a file selection window and you navigate to your datafile and sel
14. an hits vec uq hits lt quantiles hits 2 fenceLayout raw params setup num 2 move num raw params setup num 3 angle raw movement raw movement 1 move num 2 stepdist raw movement raw movement 1 move num 3 maxdist raw movement raw movement 1 move num 4 meandist as numeric walkmat move num 8 mediandist as numeric walkmat move num 9 out rbind out matrix c setup num move num fenceLayout angle stepdist maxdist meandist mediandist nreps min hits lq hits mean hits median hits uq hits max hits var hits nrow 1 ncol 16 put the output into the workspace as a data frame df layout summary lt lt as data frame out stringsAsFactors FALSE E You apply this function to the raw fenceresult data to generate the df layout summary object by using the following command gt summ layout The format of the summary file df layout summary is shown below Data Editor DER paramsId movementId tenceLayout angies stepdist maxdist meandist mediandist min hits iq hits mean hits median hits uq hits max hits var hits 1 12p5mgrid_ laplace 0 2 18 9 97861695942197 9 98574502866979 15 17 18 6 17 22 22 10 3 25mgrid laplace 0 2 10 9 97861695942197 9 98574502866979 11 13 15 2 14 18 20 13 7 SOmgrid laplace 0 2 10 9 97861695942197 9 98574502866979 14 15 17 4 18 19 21 8 3 i00mgrid leplace 0 2 10 9 97861695942197 9 9857450286697
15. dist i hits nrow 1 ncol 10 put the output into the workspace as a data frame df layout reps as data frame out stringsAsFactors FALSI To summarise details about the number of fence hits that each layout scores for each movement style you need to create the summ layout function gt fix summ layout and entering the following script function Assumes the raw datafiles are loaded col paramsId 1 col repId 2 col fenceId lt 3 col hits 4 output data frame out lt matrix 0 0 16 colnames out c paramsId movementId fenceLayout angles stepdist maxdist meandist mediandist reps min hits lq hits mean hits median hits uq hits max hits var hits reps unique raw fenceresult col repId nreps length reps setups unique raw fenceresult col paramsId nsetups length setups walkmat as matrix df walk summary for setup num in setups hits vec rep 0 times nreps for i in 1 nreps hits vec i lt sum raw fenceresult raw fenceresult col repId reps i amp raw fenceresult col paramsId setup num col hits mean hits mean hits vec min hits min hits vec max hits max hits vec var hits var hits vec quantiles hits quantile hits vec c 0 25 0 75 lq hits lt quantiles hits 1 median hits medi
16. ect it The response should look like Loading required package DBI 1 Tables fence fenceresult metadata movement params walk or gt db open d fencesim results grid1 db 1 Tables fence fenceresult metadata movement params walk It has created a link called con to the datafile file Once the connection is established you can issue commands to the database such as the example below gt dbListTables con m u om on 1 fence fenceresult metadata movement params 6 walk gt You also need to create the db close function using the command gt fix db close and entering the following script function Closes the connection to a database tmdb an open database connection if require RSQLite quietly TRUE stop Can t load the RSQLite package or one of its dependents dbDisconnect con Issuing the following command will now close the database connection gt db close 5 1 2 Loading data into R Examples of the six data tables created fence fenceresult metadata params movement and walk and the command to load them into R are shown below The data tables are created in the database file by the simulation and are accessed via SQL commands You can load all five tables from the database by creating the get datatables function using the command gt fix get datatables and
17. entering the following script function into the workspace if is con SQLiteConnection stop Bummer no database connection object con in your workspace tbl names c fence fenceresult metadata params movement walk for tablename in tbl names qry lt paste SELECT FROM tablename result dbSendQuery con qry num recs lt fetch result n 1 1 1 if num recs gt 0 qry paste SELECT FROM tablename result dbSendQuery con qry fetch all records in the result set x fetch result n 1 outname paste raw tablename sep do call list outname x free up memory resources dbClearResult result else warning paste tablename is empty gt get datatables This uses the connection con and loads the fence configuration data into the object raw fence inR 10050 0 9907 0 10057 0 10050 0 9957 0 10057 0 Data Editor ia eges femem xo v u n ves aft eors oors ose fovea ussmias 1000 9975 10007 sse 1012 5 se s 1001 5 fovea s izpsgria s eors 10s ss oors ssers eose fossas asen 9907 5 sse s sses s sese s upsgria s 10000 sse s 10007 fossas upsmgria s 19012 9987 8 10019 5 9904 5 i10012 5 10000 10019 5 i10007
18. is because it won t work properly If you don t know what any of that means then you probably don t want to try this Just relax If you want to delve into the code the guts of the simulation are in the package are also located at org cafeanimal trapsimulation Feedback especially praise and generous offers of funding can be sent to Michael Bedward michael bedward 3 gmail com and Murray Ellis murray ellis environment nsw gov au Share and enjoy
19. mulated into the walk table you need to create the summ walk function gt fix summ walk and entering the following script function Assumes datafile raw walk is loaded col movementId 1 col walkId 2 col pathDist 3 col offsetDist 4 output data frame out matrix 0 0 12 colnames out c movementId angles stepdist maxdist reps min offset lq offset mean offset median offset uq offset max offset var offset reps lt unique df walk col walkId nreps length reps moves lt unique df walk col movementId nmoves length moves for move num in moves offset vec rep 0 times nreps for i in 1 nreps offset vec i raw walk df walk col walkId reps i amp raw walk col movementId move num col offsetDist mean offset mean offset vec min offset min offset vec max offset max offset vec var offset var offset vec quantiles offset quantile offset vec c 0 25 0 75 lq offset lt quantiles offset 1 median offset median offset vec uq offset quantiles offset 2 angle raw movement raw movement 1 move num 2 Stepdist raw movement raw movement 1 move num 3 maxdist raw movement raw movement 1 move num 4 out rbind out matrix c move num angle stepdist maxdist nreps min offset lq offset mean offset
20. ns e g batchsimulation sdl The file is read and then you can commence the simulation by pressing the go button 4 Data output 4 1 Fence arrangement A description of the fence arrangements is stored in the SQLite database in the fence table when the simulation is started Also shapefiles of the fence configuration in each layout are written to the working directory These can then be viewed directly via a GIS 4 2 Walk paths Walk paths can be stored as a shapefile warning simulations can generate large amounts of walk data if this option is enabled mum NE NES I A Ye PE Y AK 277 P L Age j lic pat Figure 4 1 1 An example of the fence shape file displayed as the black lines with some short dispersal paths that miss red or hit green the drift fences 4 3 Tabular data Tabular data is exported into a sqlite format database The tables of data are metadata fence fenceresult movement params and walk They can be extracted using SQL commands from within the R statistics environment see section 5 7 2 Loading data into R and also with the freely available sqlite utility http www sqlite org 4 3 1 metadata boundsType boundsX boundsY boundsWidth boundsHeight reps samples 4 3 2 fence id layout fenceID XU yo xl yl 4 3 3 movement id angles stepdist maxdist 4 3 4 params id fenceLayout movementld 4 3 5 walk movementld walkId
21. ow and can be copied to a file called batchsimulation sdl for use In the example the fences are arranged in a 5 by 5 grid with four spacings being simulated using a series of stepdist maxdist and angles parameters Trap simulation parameters Sections can appear in any order simulation stepdist maxdist and angles parameters can have single or multiple values stepdist 1 0 2 0 5 0 10 0 maxdist 10 0 25 0 50 0 100 0 250 0 500 0 1000 0 angles laplace 0 2 laplace 0 10 laplace 0 30 laplace 0 60 laplace 0 90 uniform 180 180 samples and reps parameters must each have a single value if reps is omitted default is 1 samples 42525 reps 100 output The directory for output database and optional shapefiles Can be overridden by specifying directory and name for one or more output items dir murray work trapsim testarena root name for walk shapefiles no output if omitted walkShapefile walks root name for fence shapefiles no output if omitted fenceShapefile fences database name defaults to trapsim db if omitted db trapsim db landscape bounds type circle x 10000 y 10000 radius 1200 bounds type rect x 543000 y 6463000 width 1000 height 1000 map projection for codes see http www epsg registry org projection epsg 20254 EPSG code for AGD66 Zone 54S fences layout 12 5mgrid 9975 9975 9982 9
22. pathDist offsetDist offsetDistBearing 4 3 6 fenceresult paramslId repId fenceld hits 5 Data manipulation 5 1 Using tabular data in R R is a freely available language and environment for statistical computing and graphics related to the S statistical package R Development Core Team 2003 R A language and environment for statistical computing R Foundation for Statistical Computing Vienna Austria ISBN 3 900051 00 3 URL http www R project org Full details are available from the website from where the software and manuals can be downloaded Once data is loaded into R you can create your own analyses to explore the data Some examples are given below that can be typed in to create these functions in your R workspace Otherwise they can be cut and pasted from an electronic version of this manual To run these functions you will also require the RSQLite package which is available from the R website In the following sections commands are shown following the R prompt 2 in red normal text objects that contain data dataframes are red bold italics and objects that contain command scripts functions are blue bold italics 5 1 1 Establish connections between R and your data output file To do this you need to be able to connect and disconnect R and your SQlite database file For connecting you need to create the db open function using the command fix db open and entering the following script function filename N
23. t style you need to create the summ fences function gt fix summ fences and entering the following script function out lt matrix 0 0 17 colnames out lt c paramsId movementId fenceLayout fenceId angles stepdist maxdist meandist mediandist reps min hits lq hits mean hits median hits uq hits max hits var hits reps unique raw fenceresult repId nreps length reps setups unique raw fenceresult paramsId nsetups length setups fenceId 9999 walkmat as matrix df walk summary for setup num in setups sub fenceresult lt lt raw fenceresult raw fenceresult paramsId setup num hits vec rep 0 times nreps nfences unique sub fenceresult fenceId for fence num in nfences fenceld fence num subsub fenceresult sub fenceresult sub fenceresult fenceId fence num for i in 1 nreps hits vec i sum subsub fenceresult subsub fenceresult repId reps i hits mean hits mean hits vec min hits min hits vec max hits max hits vec var hits var hits vec quantiles hits quantile hits vec c 0 25 0 75 lq hits quantiles hits 1 median hits median hits vec uq hits quantiles hits 2 fenceLayout raw params setup num 2 move num raw params setup num 3 angle raw movement raw movement 1 move num 2
24. trapping simulation compiling and running The simulation program is written in Java and set up as a Maven project http maven apache org Once you have Maven installed on your system you should be able to build the program with the command mvn clean install issued from the top level project directory the one containing the pom xml file and this document You will need to be connected to the internet when do this so that Maven can download the libraries required by the program and the libraries required by those libraries etc If this is the first time you have done a Maven build on your system it is best to kick it off and then go for a long lunch The build will create a small program jar file in the target directory The required libraries that the program depends on at runtime will have been installed on your system in your local Maven repository To run the program issue the command mvn exec java from the top level project directory You should see a small window open up with buttons to load a parameters file and run the simulation See the section 3 of the user manual for more info If you want to distribute an executable to other folks without requiring them to have Maven installed we recommend you use the Maven Shade plugin to create a single executable jar containing the program and all required libraries You will need to hack your pom xml file to do this Don t try to use the Maven Assembly plugin or similar methods to do th

Download Pdf Manuals

image

Related Search

Related Contents

6805-GG0 Licuadora de 12 velocidades  ワンダーシェフ圧力鍋 業務用圧力鍋  Swann Maxi-Brite Cam Security Camera User Manual    KTM Ball Valves, Model OM-2 Split Body  Freecom Technologies MediaPlayer Drive-In Kit User's Manual  Lenovo ThinkCentre 41N5583 User's Manual  Kalorik - Team International Group Blender 33029 User's Manual  Samsung 510T Uživatelská přiručka  office ups - Powercom USA  

Copyright © All rights reserved.
Failed to retrieve file