-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathNEWS
888 lines (421 loc) · 74.8 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
########## Version 1.3.2 ##########
Removed the following unused functions: getParameters(), removeAssignment(), saveRList(), envCall(), getParametersOfProcess(), getBaselineOutput(), rstox.runRProcessFile().
Changed the function getBaseline to return a list of possibly three elements, 'parameters', which are the input parameters of the baseline, 'output', which is the output data from the baseline, and 'processData', which are the process data used in the baseline, specified in the project.xml file (see ?getBaseline).
Added the function getVar() which checks for the existence of a variable in a data frame, and is used to garantee an error if a variable requested from the the Java library of StoX is missing, indicating a change of name.
Removed the need for calling loadEnv() to get the stored data from the environment of a StoX project. loadEnv() has been extended and is should be used at the beginning of all plotting and report functions.
Changed the name of the following functions to starting with a dot, in order to hide these very internal functions from the package INDEX: initiateBootstrap(), jBoolean(), jDouble(), jInt(), Rstox.init().
Added the function getBaselineParameters(), which reads the projec.xml file directly and gets all input parameter values of the baseline, speeding this action up from a couple of seconds to less than 1/10 of a second.
Removed the functions Rstox.demo(), testModel(), and testModel_SweptArea(), which will be replaced by a tutorial in a later version. In the meanwhile, see examples of each function.
Changed the function imputeByAge() and the dependent function distributeAbundance() to store the indices at which age data are missing, and at which these data are extracted by random sampling of data at the same station, strata, and survey, in that prioritised order. The new method is about 5 times faster.
Added the list bootstrapParameters to the output of bootstrapParallel(), saving the seeds and other parameters. Similarly, the list imputParameters is added to the output from imputeByAge().
Added the functions getNMDinfo(), getNMDdata(), and the dependent function downloadXML(), used for downloading information and data from the API of the NMD (Norwegian Marine Data center). These functions are not completely finished, and some errors should be expected.
Added a warning in getProcessDataTableAsDataFrame() if no data are found.
Fixed a bug with encoding in xml-files encoded with UTF-8 on Windows, specifically with the nordic characters æ, ø, å. Added the line rapply(x, function(xx) iconv(xx, "UTF-8", "UTF-8"), how="replace") in downloadXML() to assure UTF-8 encoding.
Added the function as.matrix_full() for use when downloading NMD info or data.
Fixed bug in getBaselineOutput(), where projectName was used instead of baseline in the line processNames <- names(runBaseline(baseline, info=TRUE)).
Small change in bootstrapParallel(), where base.AbByLength and base.AbByInd are now generated prior to invoking cores. Also changed the output from initiateBootstrap() to being the baseline object.
Changed openProject() to not open a project that does not exist (previously the function mistakedly created the project skeleton if missing).
Added the missing iteration names to the output bootstrapVariable$AbByInd from imputeByAge().
Fixed bug in imputeByAge() and plotAbundance(), which were looking for the object 'runBootstrap_SweptArea', whereas the correct name is bootstrap_SweptArea.
########## Version 1.3.3 ##########
Changed output from the baseline and project.xml to be properly formatted as data frames with numeric and logical type whereever this is possible. Perviously missing values were given as the character "-" (now NA) and logical values as the strings "true" and "false" (nor TRUE and FALSE). This resulted in somewhat faster imputeByAge().
Added the functions getPlots() and getReports(), which can generate all available plots and reports in one call. The functions passes arguments on to the underlying plotting/report functions (all functions with name starting with plot/report).
Added the variables 'level' (level of processing, currntly one of "boostrap" and "impute"), 'var' (the variable to return/plot, currently "abundance" and "weight"), and 'unit' (the unit of the variable, such as "tonnes", and "thousands", or the abbreviations "t", and "1000", see getPlottingUnit() for valid values), along with the variable 'type' (one of "acoustic" and "sweptarea").
Changed loadEnv() to check for already loaded data before loading the data. This functions should called first in all plotting and report functions. Added the function .load_Rstox() used in loadEnv() to load data with old formatting ("-" for NA and "true" for TRUE).
Changed and simplified plotAbundance().
Added the functions getReportVarName() and abbrMatch(), generating the report variable name used by plotting and reporting functions, and matches a string by abbreviation using the method of "$". Rstox now saves plots and reports using the same naming convension, which is level_var_otherparameters, where otherparameters are grp1 and grp2 in the getPlots() and getReports(), which both use the function reportAbundance().
The function polyArea() was changed to take holes in the polygon definitions into account.
########## Version 1.4 ##########
Removed the following unused functions: getParameters(), removeAssignment(), saveRList(), envCall(), getParametersOfProcess(), getBaselineOutput(), rstox.runRProcessFile(), Rstox.demo(), testModel(), and testModel_SweptArea().
Changed the function getBaseline to return a list of possibly three elements, 'parameters', which are the input parameters of the baseline, 'output', which is the output data from the baseline, and 'processData', which are the process data used in the baseline, specified in the project.xml file (see ?getBaseline).
Removed the need for calling loadEnv() to get the stored data from the environment of a StoX project. loadEnv() has been extended and is should be used at the beginning of all plotting and report functions.
Added the function getBaselineParameters(), which reads the projec.xml file directly and gets all input parameter values of the baseline, speeding this action up from a couple of seconds to less than 1/10 of a second.
Changed the function imputeByAge() and the dependent function distributeAbundance() to store the indices at which age data are missing, and at which these data are extracted by random sampling of data at the same station, strata, and survey, in that prioritised order. The new method is about 5 times faster.
Added the list bootstrapParameters to the output of bootstrapParallel(), saving the seeds and other parameters. Similarly, the list imputParameters is added to the output from imputeByAge().
Added the functions getNMDinfo(), getNMDdata(), and the dependent function downloadXML(), used for downloading information and data from the API of the NMD (Norwegian Marine Data center). These functions are not completely finished, and some errors should be expected.
Changed output from the baseline and project.xml to be properly formatted as data frames with numeric and logical type whereever this is possible. Perviously missing values were given as the character "-" (now NA) and logical values as the strings "true" and "false" (nor TRUE and FALSE). This resulted in somewhat faster imputeByAge().
Added the functions getPlots() and getReports(), which can generate all available plots and reports in one call. The functions passes arguments on to the underlying plotting/report functions (all functions with name starting with plot/report).
Added the variables 'level' (level of processing, currntly one of "boostrap" and "impute"), 'var' (the variable to return/plot, currently "abundance" and "weight"), and 'unit' (the unit of the variable, such as "tonnes", and "thousands", or the abbreviations "t", and "1000", see getPlottingUnit() for valid values), along with the variable 'type' (one of "acoustic" and "sweptarea").
Changed loadEnv() to check for already loaded data before loading the data. This functions should called first in all plotting and report functions. Added the function .load_Rstox() used in loadEnv() to load data with old formatting ("-" for NA and "true" for TRUE).
The function polyArea() was changed to take holes in the polygon definitions into account.
########## Version 1.4.1 ##########
Changed createProject() to accept templates and sorted out getNMDdata() to create living StoX projects.
Added the function updateProject() for pointing to xml files that are new or changed in the project, and closeProject() for removing a project form memory.
Fixed bug with encoding occurring on Windows when rCurl was used for downloading files from NMD. The new downloadXML() uses download.file() in the 'base' package, which avoids the encoding issue by not interpreting the file encoding, but merely downloading it to the project.
New output folder structure, now placing RData files in output/r/data and plots and report files in output/r/report.
Added the lists originalParameters, currentParameters and lastParameters, enabling check for which processes in the baseline that need to be rerun when running runBaseline(). The parameter 'save' now implies saving the last used parameters as the current parameters. To save the project with the current parameters (which could differ from the original parameters), use saveProject().
Changed the structure of the RstoxEnv environment so that each project now has a list containing the original, current and last used baseline parameters, the project Java object, and the environment of output data from bootstrapping and imputing, whereas the parameters were not saved, and the output data were contained in a separate project environment in the global environment prior to this change.
Added the function updateProject(), used for creating links to the xml-files stored in the project directory. Here the limit of 20 files applies. Also added closeProject() for removing a project form memory.
Added the option 'reset' in runBaseline() which forces the baseline to be rerun between the given start and end processes (used in particularl in runBootstrap(), which reruns the baseline model after changing some baseline data in memory).
The function getBaseline() now accepts the parameters of runBaseline(), such as parlist and ..., which are used to modifying baseline parameters. This makes it unnecessary to run runBaseline() before getBaseline().
Changed modifyBaselineParameters() to setBaselineParameters().
Added the functions .getParlist(), readBaselineParameters(), getBaselineParameters() and modifyBaselineParameters().
Added the option 'serialno' in getNMDdata().
The function saveRImage() was replaced (but still acting as an alias for) the new function savePojectData(), which first moves all old files with identical names to those to be saved to output/r/data/trash, and then writes the files to output/r/data. The same procedure will be implemented in StoX when writing data to output/baseline/data.
Similarly, the function loadEnv() was replaced (but still acting as an alias for) the new function loadPojectData().
Added the functions setProjectData() and getProjectData() for setting and getting project data to/from the project envirinment.
Added the function moveToTrash() for moving existing files to the trash directory in the same folder.
Added the option 'msg' to runBaseline().
Changed .load_Rstox() to .loadToRstox().
Removed warnings when baseline processes do not have output data.
Removed the option 'projectRoot' in createProject, and replaced this by 'dir'.
Changed setAssignments() and setMeanNASCValues() (changed to setNASC()) to accept projectName as input. Also reset the MeanNASC values to the original in bootstrapParallel() if cores == 1.
########## Version 1.4.3 ##########
Added progress bar in runBootstrap() and imputeByAge() (also in parallel).
Fixed bug with bootstrapping where there are missing trawl stations in one or more strata. The bootstrapping now continues with a warning.
########## Version 1.5 (2016-12-22, highlights) ##########
Fixed the function getNMDdata() to download data and create StoX corking projects with a simple template as default. This enables downloading and reading biotic data in a simple manner by Rstox, achieved by a call to getNMDdata() and getBaseline().
New output folder structure, now placing RData files in output/r/data and plots and report files in output/r/report.
Added the lists originalParameters, currentParameters and lastParameters, enabling check for which processes in the baseline that need to be rerun when running runBaseline(). The parameter 'save' now implies saving the last used parameters as the current parameters. To save the project with the current parameters (which could differ from the original parameters), use saveProject().
Added progress bar in runBootstrap() and imputeByAge() (also in parallel).
Added the function updateProject() for pointing to xml files that are new or changed in the project, and closeProject() for removing a project form memory.
Added the option 'reset' in runBaseline() which forces the baseline to be rerun between the given start and end processes (used in particularl in runBootstrap(), which reruns the baseline model after changing some baseline data in memory).
The function getBaseline() now accepts the parameters of runBaseline(), such as parlist and ..., which are used to modifying baseline parameters. This makes it unnecessary to run runBaseline() before getBaseline().
Added the functions .getParlist(), readBaselineParameters(), getBaselineParameters() and modifyBaselineParameters().
Added the option 'serialno' in getNMDdata().
The function saveRImage() was replaced (but still acting as an alias for) the new function savePojectData(), which first moves all old files with identical names to those to be saved to output/r/data/trash, and then writes the files to output/r/data. The same procedure will be implemented in StoX when writing data to output/baseline/data.
Similarly, the function loadEnv() was replaced (but still acting as an alias for) the new function loadPojectData().
Added the functions setProjectData() and getProjectData() for setting and getting project data to/from the project envirinment.
Added the function moveToTrash() for moving existing files to the trash directory in the same folder.
########## Version 1.5.2 (2017-01-27) ##########
Added the function readXMLfiles() for reading XML-files (creating a temporary StoX project).
Rstox can now create and open projects located elsewhere than the default workspace, using the full path as the input projectName.
Added encoding="UTF-8" in getProcessDataTableAsDataFrame() and getDataFrameAtLevel() (used by getBaseline()) preventing misrepresented nordic characters (æ, ø, å).
Added the option 'tsn' in getNMDdata(), specifying a species by the tsn (species) code. Run g <- getNMDinfo("taxa") for a matrix of tsn codes and species names.
Changed treatment of 'acousticMethod' and 'bioticMethod' in runBootstrap(). The two existing methods are currently (a) one which bootstraps acoustic PSUs and trawl stations within stratum, and (b) one which only bootstraps trawl stations within stratum. Previously the trawl stations were denoted by "EDSU", but a more precice notation is "PSU", which also includes possible grouping of trawl stations into one PSU which should be included in the bootstrapping as a whole (not as single trawl stations). The preferred notation indicating the existing bootstrap methods is now PSU~Stratum, whereas EDSU~Stratum is still accepted, with a deprecation-warning.
Added the option 'simplify' in getNMDinfo(), which converts the data into matrices that are easier to access. Also added case insentitive support for the reference data type.
Added the function getProject() for use in saveProject() and openProject(). This function searches for the project Java object in R memory. Also added isProject() and reopenProject()
Removed the paramters startProcess and endProcess in bootstrapOneIteration() and bootstrapParallel().
Added the function getProjectPaths() to return all useful paths of a project.
Added the function getRstoxEnv() using initiateRstoxEnv(), which should be used when retrieving data from the RstoxEnv environment or the environment of a project. When writing to the environment of a project, allways do temp <- getRstoxEnv() first to ensure that the RstoxEnv environment exists.
Updated baseline2eca(), which now returns the data 'biotic', 'landing', covariate matrices realted to these two, and various resource objects.
########## Version 1.5.3 (2017-03-02) ##########
########## Version 1.6 (2017-01-27) (All changes from version 1.5) ##########
Added the function readXMLfiles() for reading XML-files (creating a temporary StoX project).
Rstox can now create and open projects located elsewhere than the default workspace, using the full path as the input projectName.
Added encoding="UTF-8" in getProcessDataTableAsDataFrame() and getDataFrameAtLevel() (used by getBaseline()) preventing misrepresented nordic characters (æ, ø, å).
Added the option 'tsn' in getNMDdata(), specifying a species by the tsn (species) code. Run g <- getNMDinfo("taxa") for a matrix of tsn codes and species names.
Changed treatment of 'acousticMethod' and 'bioticMethod' in runBootstrap(). The two existing methods are currently (a) one which bootstraps acoustic PSUs and trawl stations within stratum, and (b) one which only bootstraps trawl stations within stratum. Previously the trawl stations were denoted by "EDSU", but a more precice notation is "PSU", which also includes possible grouping of trawl stations into one PSU which should be included in the bootstrapping as a whole (not as single trawl stations). The preferred notation indicating the existing bootstrap methods is now PSU~Stratum, whereas EDSU~Stratum is still accepted, with a deprecation-warning.
Added the option 'simplify' in getNMDinfo(), which converts the data into matrices that are easier to access. Also added case insentitive support for the reference data type.
Added the function getProject() for use in saveProject() and openProject(). This function searches for the project Java object in R memory. Also added isProject() and reopenProject()
Removed the paramters startProcess and endProcess in bootstrapOneIteration() and bootstrapParallel().
Added the function getProjectPaths() to return all useful paths of a project.
Added the function getRstoxEnv() using initiateRstoxEnv(), which should be used when retrieving data from the RstoxEnv environment or the environment of a project. When writing to the environment of a project, allways do temp <- getRstoxEnv() first to ensure that the RstoxEnv environment exists.
Updated baseline2eca(), which now returns the data 'biotic', 'landing', covariate matrices realted to these two, and various reasource objects.
########## Version 1.6.1 (2017-05-18) ##########
Fixed bug on Mac with rJava: Changed Sys.setenv(JAVA_HOME="") to if(Sys.getenv("JAVA_HOME")!="") Sys.setenv(JAVA_HOME="") in the onload() function.
Changed the output from runBootstrap() to TRUE (invisibly), instead of the bootstrap object, which can be memory consuming.
Removed the parameter 'par' of getBaseline(), which was used to uniquely select processes using the same function. This method was replaced by the following method: If more than one process use the same function, return data from that which has process name equal to the function name, and if such a process does not exist, return the first process with a warning.
Removed the parameter 'fun' of getBaseline(). The old method supported both the process name 'proc' and the function name 'fun' when specifying which process to get data from, but the new method only use one parameter 'proc'. The function now searces for a match in process name, and then in function name, picking the first process in the case of multiple matches, with a warning.
Removed the old functions bootstrapBioticAcoustic() and bootstrapBioticSweptArea().
Added the function wkt_MULTIPOLYGON(), adding support for lists of two column polygon matrices in polyArea().
Fixed bug in baseline2eca().
########## Version 1.6.2 (2017-08-23) ##########
Fixed bug with AreaMethod="accurate" in the process StratumArea, which had no effect when run from Rstox.
Added the function varianceEstimation(), which implements the variance estimation of Jolly, G. M., & Hampton, I. (1990). A stratified random transect design for acoustic surveys of fish stocks. Canadian Journal of Fisheries and Aquatic Sciences, 47(7), 1282-1291.
Re-introduced the defaults acousticMethod=PSU~Stratum, bioticMethod=PSU~Stratum in runBootstrap().
Changed the function readBaselineParameters() to parse the project.XML file.
Added the parameter 'model' in readXMLfiles(), allowing for specifying additional processing of the data read from XML files. A simple example is readXMLfiles(AcousticXMLfiles, model=list(NASC=list(AcousticData="Process(ReadAcousticXML)"))), which for acoustic XML files also calculates the NASC values.
Added the function addProcesses(), which adds processes to a project object given a list of parameter specifications as returned by getParlist().
Simplified how custom models are implemented in createProject(), which now first runs addProcesses() and then setBaselineParameters().
Renamed the object currentParameters in the project environment to javaParameters, to stress that these are the current parameter values in the project Java object. The object lastParameters is the parameters used during the last baseline run, which do not have to be identical to the javaParameters, in case the parameter values in Java were reset to the previous parameter values.
########## Version 1.6.3 (2017-10-01) ##########
Added support in modifyBaselineParameters() used by runBaseline() for specifying StoX processes by their name only, and not Process(name_of_the_processs).
Modified the function getNMDinfo() to return data frames instead of matrices.
Added the function abbrevWords(), used when abbreviting survey time series and cruise series downloaded from NMD using getNMDdata(, abbrev=TRUE).
Restructured the function getNMDdata(). Added the parameters subdir, which creates a directory inside the StoX projects directory in which to put multiple StoX projects (typically survey time series and cruise series), and abbrev, which abbreviates the StoX project names by the function abbrevWords() (using sub=-1 on years, ship names and other suffixes).
Updated the Test_Rstox project to the new R and R report structure (bootstrap and imputeByAge in R, and plots and reports in R report).
Changed the output from createProject(NULL) to return full paths of StoX projects located in the default workspace and sub directories.
Added the parameter 'msg' to createProject().
Changed the way Rstox recognizes StoX projects. From this version on StoX project names can be given either (i) by their full path, (ii) their name, in which case Rstox searches first in the default workspace and then in subdirectories, (iii) the path relative to the default workspace. This build support for organizing projects in the workspace in subdirectories.
Changed the output from createProject() to return a list of processes for the available templates.
Changed createProject("Test_Rstox") to autumatically use the example files for this particular project name. Also changed openProject("Test_Rstox") to create the project if missing. Thus there is no need to pre-create the test project. It is created when needed. Use createProject("Test_Rstox", ow=TRUE) to re-create the test project. This simplified the examples.
Added support for creating a project directly from an URL of a zipped StoX project, either given as 'files' in createProject() (where the projectName can be specified), or as 'projectName', in which case the project name of the zipped project is used.
Added the function getRstoxVersion(), which returns the version of Rstox and the StoX Java library used by Rstox (and StoX).
Added the function downloadProjectZip(), which downloads a zipped project from an URL, used by createProject() and getNMDdata().
Added the function data.frame2parString() and parString2data.frame(), converting from a data.frame to a string as used by the StoX functions Catchability and SplitNASC, and the the opposite.
Added the function isProjectZipURL(), which returns TRUE for URLs containing "http" or "ftp" AND "zip".
Included a requirement on the data.table package (>= 1.10.4-3) in this version, due to issues with parallel processing on Mac in the version preceding the required one.
Removed the integers leading the name of sub lists in the element "outputData" in the list returned from getBaseline().
########## Version 1.6.4 (2017-10-01) ##########
As of Rstox_1.7 (starting from Rstox_1.6.3) the results from runBootstrap() differs in precision due to a change in StoX. Before, very small numbers were rounded off to 0, whereas from Rstox_1.6.3 numbers on StoX are kept with 4 significant digits. This change may lead to small changes ( < 1e-7) in abundance from the baseline model, which also propagates into the results of runBaseline() and imputeByAge().
Removed plotAbundance_old(), which is no longer used. The new plotAbundance() uses ggplot2 for nicer plotting.
Changed default width, height, dpi to 5000, 3000, 500. Also added the option format=NULL, causing plots to only show in the graphics window.
Fixed a bug in readBaselineParameters(), where processes with 'enabled' set to "false" were removed. This caused problems when matching process names, and from now 'enabled' is returned in the parameter list instead.
Changed names of bootstrap runs to have constant number of characters, by padding run number by zeros.
Added the function sampleSorted(), which is used for all sampling throughout Rstox. This function sorts the values before sampling in order to be independent of any rearranging of the data (suppressed when the parameter sorted=FALSE). The function also includes a seed, ensuring that seeds are applied immediately before sampling.
Added the parameter 'sorted' with default TRUE to all bootstrap functions. This implies that all bootstrap functions change from Rstox_1.6 to Rstox_1.7, and different results should be expected. This change was forced by the discovery that two copies of the same project, where in the first the option NASC -> LayerType = WaterColumn is selected, and in the second NASC -> LayerType = PChannel, resulted in different bootstrap estimates. This behavior was considered to be a bug, and the chosen solution was to sort values prior to sampling (in the latter project the aggregation over depth layers was done in Rstox, with a method that resulted in a different ordering of the data than that of the first project).
Added the function runBootstrap_1.6(), which is identical to runBootstrap() with sorted=FALSE. This function can be used to obtain identical bootstrap results as in Rstox_1.6.
Introduced the new parameter 'bootstrapMethod' in runBootstrap(), which indicates the method to use for the different project types. Also restructured the bootstrap functions to have one function per project type, runBootstrap_acousticTrawl(), runBootstrap_sweptArea_length() and runBootstrap_sweptArea_total(), where the latter is a new bootstrap method designed for projects with total catch only and no individual measurements in the samples. The parameters 'acousticMethod' and 'bioticMethod' are still in use, but specifying the levels of the bootstrapping rather than the method itself. In the current version only the PSU~Stratum value is accepted (for bioticMethod EDSU~Stratum is interpreted as PSU~Stratum), but other combinations will can be implemented in future versions, such as Individual~PSU and even multiple combinations.
Changed the function setBaselineParameters() to set the parameters either in Java memory and in the javaParameters field in the project environment (save="java"), or in the lastParameters field in the project environment and projectData outputed from bootstrap and impute functions (save="last"), or both (save=TRUE or c("java", "last")).
Added the function linkPSU2Stratum(), which adds stratum information to PSU data. This is used in the functions varianceEstimation() and runBootstrap_sweptArea_total().
Reorganized the function getProjectPaths() to more clearly execute the following intension given the input 'projectName': If given as a baseline or project Java object, get and return project parts from the object. If given as a full path, check whether the dirname(dirname()) exists. Otherwise paste the projectRoot and projectName, and do the same check on this path. Otherwise paste the default projectRoot and the projectName and to the same check on this path.
Added the function saveasProject(), which saves the current Java settings of a project to a new project. This function first saves (softly) the current project, copies the saved project, and then resets the current project using the new function resetProject() with to="saved".
Added the object 'savedParameters' in the project environment, which is changed when saveProject() is run with soft=FALSE.
Changed default msg to FALSE in setBaselineParameters().
Fixed bug in plotAbundance() and plotNASCDistribution(), where parameters specified in the ... could result in the function specified by 'format' (such as png and jpeg).
Fixed bug in plotAbundance(), where missing valued in the variable specified by 'grp2' were assigned the value min(grp1) - 1. Changed to min(grp2) - 1.
Added the option format=NULL in plotAbundance() and plotNASCDistribution(), causing the plot to show in the graphics window only (not saved to file).
Added the parameter 'out' to the function getProject(), with a new possible value "report" for returning the Baseline Report object.
Changed how seeds are generated throughout Rstox. All seeds are now generated using the functions setSeedSingle(), getSeedV(), getSeedM(), expandSeed() and getSequenceToSampleFrom(). This is intended to make the generation of seeds in the package less fragile to changes in the code.
Changed names of bootstrap replicates to have fixed width, by padding with trailing zeros in the run index number (e.g, run001, run002, ..., run123, for nboot=123).
Added the function is.empty() for use to test whether parameters are given (returns TRUE for zeros length, zeros characters, "null" and NA).
Fixed bug in checkNumPSUsInStratum(), where the number of PSUs in each stratum is evaluated, and a warnings is issued for strata with less than 2 PSUs. Here only the strata with a positive number of PSUs were checked. Fixed by combining 'psustratum' and 'stratumpolygon' in the process data.
Changed the structure of the RstoxEnv environment to having two lists "Definitions" and "Projects". Also added the project path to project environments, which are located in "Projects".
Added the function listOpenProjects() which returns a data frame with the project name and path of the loaded projects.
Fixed bug in getProjectPaths(), where repeated calls using the output project name of the functions as input resulted in different project paths. Fixed by checking the loaded projects.
Added the option 'log' in getPlots(), specifying which axes to apply log10() to.
Changed the shape of outliers in plotAbundance to filled diamonds, to separate them from other points.
Changed structure and name of bootstrapImpute$imputeParameters$msg to bootstrapImpute$imputeParameters$imputeSummary in the project data environment (getProjectDataEnv()). Added bootstrapMethod, acousticMethod and bioticMethod to bootstrapImpute$imputeParameters.
Fixed bug in plotAbundance_AcousticTrawl() when all values of the variable specified by 'grp1' are missing (NA).
Added support for separating options by comma (",") in getPlots() and getReports() (only applicable if none of the individual parameters are specified as vectors or in some other way specified using commas).
########## Version 1.6.5 (2017-11-30) ##########
Fixed bug in openProject() where the function readBaselineParameters() was used to read the parameters directly from the project.xml file, as opposed to reading the parameters from the project Java object. As a result, changes to parameters made by StoX when opening av project were not picked up. From Rstox_1.6.5 the function readBaselineParametersJava() is used instead.
########## Version 1.7 (2017-11-30) (All changes from version 1.6) ##########
Fixed bug in openProject() where the function readBaselineParameters() was used to read the parameters directly from the project.xml file, as opposed to reading the parameters from the project Java object. As a result, changes to parameters made by StoX when opening av project were not picked up. From Rstox_1.6.5 the function readBaselineParametersJava() is used instead.
As of Rstox_1.7 (starting from Rstox_1.6.3) the results from runBootstrap() differs in precision due to a change in StoX. Before, very small numbers were rounded off to 0, whereas from Rstox_1.6.3 numbers on StoX are kept with 4 significant digits. This change may lead to small changes ( < 1e-7) in abundance from the baseline model, which also propagates into the results of runBaseline() and imputeByAge().
Removed plotAbundance_old(), which is no longer used. The new plotAbundance() uses ggplot2 for nicer plotting.
Changed default width, height, dpi to 5000, 3000, 500. Also added the option format=NULL, causing plots to only show in the graphics window.
Fixed a bug in readBaselineParameters(), where processes with 'enabled' set to "false" were removed. This caused problems when matching process names, and from now 'enabled' is returned in the parameter list instead.
Changed names of bootstrap runs to have constant number of characters, by padding run number by zeros.
Added the function sampleSorted(), which is used for all sampling throughout Rstox. This function sorts the values before sampling in order to be independent of any rearranging of the data (suppressed when the parameter sorted=FALSE). The function also includes a seed, ensuring that seeds are applied immediately before sampling.
Added the parameter 'sorted' with default TRUE to all bootstrap functions. This implies that all bootstrap functions change from Rstox_1.6 to Rstox_1.7, and different results should be expected. This change was forced by the discovery that two copies of the same project, where in the first the option NASC -> LayerType = WaterColumn is selected, and in the second NASC -> LayerType = PChannel, resulted in different bootstrap estimates. This behavior was considered to be a bug, and the chosen solution was to sort values prior to sampling (in the latter project the aggregation over depth layers was done in Rstox, with a method that resulted in a different ordering of the data than that of the first project).
Added the function runBootstrap_1.6(), which is identical to runBootstrap() with sorted=FALSE. This function can be used to obtain identical bootstrap results as in Rstox_1.6.
Introduced the new parameter 'bootstrapMethod' in runBootstrap(), which indicates the method to use for the different project types. Also restructured the bootstrap functions to have one function per project type, runBootstrap_acousticTrawl(), runBootstrap_sweptArea_length() and runBootstrap_sweptArea_total(), where the latter is a new bootstrap method designed for projects with total catch only and no individual measurements in the samples. The parameters 'acousticMethod' and 'bioticMethod' are still in use, but specifying the levels of the bootstrapping rather than the method itself. In the current version only the PSU~Stratum value is accepted (for bioticMethod EDSU~Stratum is interpreted as PSU~Stratum), but other combinations will can be implemented in future versions, such as Individual~PSU and even multiple combinations.
Changed the function setBaselineParameters() to set the parameters either in Java memory and in the javaParameters field in the project environment (save="java"), or in the lastParameters field in the project environment and projectData outputed from bootstrap and impute functions (save="last"), or both (save=TRUE or c("java", "last")).
Added the function linkPSU2Stratum(), which adds stratum information to PSU data. This is used in the functions varianceEstimation() and runBootstrap_sweptArea_total().
Reorganized the function getProjectPaths() to more clearly execute the following intension given the input 'projectName': If given as a baseline or project Java object, get and return project parts from the object. If given as a full path, check whether the dirname(dirname()) exists. Otherwise paste the projectRoot and projectName, and do the same check on this path. Otherwise paste the default projectRoot and the projectName and to the same check on this path.
Added the function saveasProject(), which saves the current Java settings of a project to a new project. This function first saves (softly) the current project, copies the saved project, and then resets the current project using the new function resetProject() with to="saved".
Added the object 'savedParameters' in the project environment, which is changed when saveProject() is run with soft=FALSE.
Changed default msg to FALSE in setBaselineParameters().
Fixed bug in plotAbundance() and plotNASCDistribution(), where parameters specified in the ... could result in the function specified by 'format' (such as png and jpeg).
Fixed bug in plotAbundance(), where missing valued in the variable specified by 'grp2' were assigned the value min(grp1) - 1. Changed to min(grp2) - 1.
Added the option format=NULL in plotAbundance() and plotNASCDistribution(), causing the plot to show in the graphics window only (not saved to file).
Added the parameter 'out' to the function getProject(), with a new possible value "report" for returning the Baseline Report object.
Changed how seeds are generated throughout Rstox. All seeds are now generated using the functions setSeedSingle(), getSeedV(), getSeedM(), expandSeed() and getSequenceToSampleFrom(). This is intended to make the generation of seeds in the package less fragile to changes in the code.
Changed names of bootstrap replicates to have fixed width, by padding with trailing zeros in the run index number (e.g, run001, run002, ..., run123, for nboot=123).
Added the function is.empty() for use to test whether parameters are given (returns TRUE for zeros length, zeros characters, "null" and NA).
Fixed bug in checkNumPSUsInStratum(), where the number of PSUs in each stratum is evaluated, and a warnings is issued for strata with less than 2 PSUs. Here only the strata with a positive number of PSUs were checked. Fixed by combining 'psustratum' and 'stratumpolygon' in the process data.
Changed the structure of the RstoxEnv environment to having two lists "Definitions" and "Projects". Also added the project path to project environments, which are located in "Projects".
Added the function listOpenProjects() which returns a data frame with the project name and path of the loaded projects.
Fixed bug in getProjectPaths(), where repeated calls using the output project name of the functions as input resulted in different project paths. Fixed by checking the loaded projects.
Added the option 'log' in getPlots(), specifying which axes to apply log10() to.
Changed the shape of outliers in plotAbundance to filled diamonds, to separate them from other points.
Changed structure and name of bootstrapImpute$imputeParameters$msg to bootstrapImpute$imputeParameters$imputeSummary in the project data environment (getProjectDataEnv()). Added bootstrapMethod, acousticMethod and bioticMethod to bootstrapImpute$imputeParameters.
Fixed bug in plotAbundance_AcousticTrawl() when all values of the variable specified by 'grp1' are missing (NA).
Added support for separating options by comma (",") in getPlots() and getReports() (only applicable if none of the individual parameters are specified as vectors or in some other way specified using commas).
Added support in modifyBaselineParameters() used by runBaseline() for specifying StoX processes by their name only, and not Process(name_of_the_processs).
Modified the function getNMDinfo() to return data frames instead of matrices.
Added the function abbrevWords(), used when abbreviting survey time series and cruise series downloaded from NMD using getNMDdata(, abbrev=TRUE).
Restructured the function getNMDdata(). Added the parameters subdir, which creates a directory inside the StoX projects directory in which to put multiple StoX projects (typically survey time series and cruise series), and abbrev, which abbreviates the StoX project names by the function abbrevWords() (using sub=-1 on years, ship names and other suffixes).
Updated the Test_Rstox project to the new R and R report structure (bootstrap and imputeByAge in R, and plots and reports in R report).
Changed the output from createProject(NULL) to return full paths of StoX projects located in the default workspace and sub directories.
Added the parameter 'msg' to createProject().
Changed the way Rstox recognizes StoX projects. From this version on StoX project names can be given either (i) by their full path, (ii) their name, in which case Rstox searches first in the default workspace and then in subdirectories, (iii) the path relative to the default workspace. This build support for organizing projects in the workspace in subdirectories.
Changed the output from createProject() to return a list of processes for the available templates.
Changed createProject("Test_Rstox") to autumatically use the example files for this particular project name. Also changed openProject("Test_Rstox") to create the project if missing. Thus there is no need to pre-create the test project. It is created when needed. Use createProject("Test_Rstox", ow=TRUE) to re-create the test project. This simplified the examples.
Added support for creating a project directly from an URL of a zipped StoX project, either given as 'files' in createProject() (where the projectName can be specified), or as 'projectName', in which case the project name of the zipped project is used.
Added the function getRstoxVersion(), which returns the version of Rstox and the StoX Java library used by Rstox (and StoX).
Added the function downloadProjectZip(), which downloads a zipped project from an URL, used by createProject() and getNMDdata().
Added the function data.frame2parString() and parString2data.frame(), converting from a data.frame to a string as used by the StoX functions Catchability and SplitNASC, and the the opposite.
Added the function isProjectZipURL(), which returns TRUE for URLs containing "http" or "ftp" AND "zip".
Included a requirement on the data.table package (>= 1.10.4-3) in this version, due to issues with parallel processing on Mac in the version preceding the required one.
Removed the integers leading the name of sub lists in the element "outputData" in the list returned from getBaseline().
Fixed bug with AreaMethod="accurate" in the process StratumArea, which had no effect when run from Rstox.
Added the function varianceEstimation(), which implements the variance estimation of Jolly, G. M., & Hampton, I. (1990). A stratified random transect design for acoustic surveys of fish stocks. Canadian Journal of Fisheries and Aquatic Sciences, 47(7), 1282-1291.
Re-introduced the defaults acousticMethod=PSU~Stratum, bioticMethod=PSU~Stratum in runBootstrap().
Changed the function readBaselineParameters() to parse the project.XML file.
Added the parameter 'model' in readXMLfiles(), allowing for specifying additional processing of the data read from XML files. A simple example is readXMLfiles(AcousticXMLfiles, model=list(NASC=list(AcousticData="Process(ReadAcousticXML)"))), which for acoustic XML files also calculates the NASC values.
Added the function addProcesses(), which adds processes to a project object given a list of parameter specifications as returned by getParlist().
Simplified how custom models are implemented in createProject(), which now first runs addProcesses() and then setBaselineParameters().
Renamed the object currentParameters in the project environment to javaParameters, to stress that these are the current parameter values in the project Java object. The object lastParameters is the parameters used during the last baseline run, which do not have to be identical to the javaParameters, in case the parameter values in Java were reset to the previous parameter values.
Fixed bug on Mac with rJava: Changed Sys.setenv(JAVA_HOME="") to if(Sys.getenv("JAVA_HOME")!="") Sys.setenv(JAVA_HOME="") in the onload() function.
Changed the output from runBootstrap() to TRUE (invisibly), instead of the bootstrap object, which can be memory consuming.
Removed the parameter 'par' of getBaseline(), which was used to uniquely select processes using the same function. This method was replaced by the following method: If more than one process use the same function, return data from that which has process name equal to the function name, and if such a process does not exist, return the first process with a warning.
Removed the parameter 'fun' of getBaseline(). The old method supported both the process name 'proc' and the function name 'fun' when specifying which process to get data from, but the new method only use one parameter 'proc'. The function now searces for a match in process name, and then in function name, picking the first process in the case of multiple matches, with a warning.
Removed the old functions bootstrapBioticAcoustic() and bootstrapBioticSweptArea().
Added the function wkt_MULTIPOLYGON(), adding support for lists of two column polygon matrices in polyArea().
Fixed bug in baseline2eca().
########## Version 1.7.1 (2017-12-01) ##########
Fixed bug in plotAbundance_AcousticTrawl() and plotAbundance_SweptAreaLength(), where missing values were shown as the lowest value minus 1. Now these are shown as NA to the left of the plot (using the new funciton factorNAfirst()).
Replaced the funciton wkt2MULTIPOLYGON() by matrix2multipolygon(), and added the reversed funciton multipolygon2matrix(). See ?polyArea for use of these funciotns.
Fixed unwanted removal of points in plotAbundance() when CV values were outside of the ylim. Now lines will still show. Also added the option of maxcv=TRUE, which adjusts the upper ylim to the maximum CV if above 1.
Moved warnings due to no unknown or no known ages from distributeAbundance() to imputeByAge().
Changed rownames of the output from imputeByAge() to the same as the names of the bootstrap runs.
Removed bug in reportAbundanceAtLevel(), where grp2 was left out form the output when plotOutput=TRUE,
Fixed bug in reportAbundance_SweptAreaTotal() where the column SpecCat was missing.
Fixed bug in imputeByAge() where no unknown ages resulted in a different output from distributeAbundance().
Added notes about 64 bit R on Windows in the README file.
########## Version 1.7.2 (2017-12-21) ##########
Fixed bug in getNMDdata(), where serialno = c(start, end) was not interpreted as start : end, as expected from the documentation. From Rstox 1.8 on serialno is a vector of all the serialnumbers to download data from.
Fixed bug in getNMDdata(), where there was no restriction on file name when multiple serialno-ranges were requested. From Rstox 1.8 on, only the first and last serialno is included in the file name, irrespective of sub intervals in serialno.
Removed the main title of plotNASCDistribution(), in order to avoid diffs during automatic testing.
Changed name of Rstox_1.7.2.tar.gz to Rstox-1.7.2.tar.gz to comply with the releases from GitHub.
Fixed bug in factorNAfirst(), where exclude=FALSE removed zeros. Changed to exclude=NULL.
########## Version 1.8 (2018-01-10) (All changes from version 1.7) ##########
Fixed bug in plotAbundance_AcousticTrawl() and plotAbundance_SweptAreaLength(), where missing values were shown as the lowest value minus 1. Now these are shown as NA to the left of the plot (using the new funciton factorNAfirst()).
Replaced the funciton wkt2MULTIPOLYGON() by matrix2multipolygon(), and added the reversed funciton multipolygon2matrix(). See ?polyArea for use of these funciotns.
Fixed unwanted removal of points in plotAbundance() when CV values were outside of the ylim. Now lines will still show. Also added the option of maxcv=TRUE, which adjusts the upper ylim to the maximum CV if above 1.
Moved warnings due to no unknown or no known ages from distributeAbundance() to imputeByAge().
Changed rownames of the output from imputeByAge() to the same as the names of the bootstrap runs.
Removed bug in reportAbundanceAtLevel(), where grp2 was left out form the output when plotOutput=TRUE,
Fixed bug in reportAbundance_SweptAreaTotal() where the column SpecCat was missing.
Fixed bug in imputeByAge() where no unknown ages resulted in a different output from distributeAbundance().
Added notes about 64 bit R on Windows in the README file.
Fixed bug in getNMDdata(), where serialno = c(start, end) was not interpreted as start : end, as expected from the documentation. From Rstox 1.8 on serialno is a vector of all the serialnumbers to download data from.
Fixed bug in getNMDdata(), where there was no restriction on file name when multiple serialno-ranges were requested. From Rstox 1.8 on, only the first and last serialno is included in the file name, irrespective of sub intervals in serialno.
Removed the main title of plotNASCDistribution(), in order to avoid diffs during automatic testing.
Changed name of Rstox_1.7.2.tar.gz to Rstox-1.7.2.tar.gz to comply with the releases from GitHub.
Fixed bug in factorNAfirst(), where exclude=FALSE removed zeros. Changed to exclude=NULL.
########## Version 1.8.1 (2018-01-25) ##########
Removed the function baseline2ECA(), which is covered by baseline2eca().
Added the option of downloading all seralno from a year if serialno is not set.
Added the function surveyPlanner() used to generate parallel or zigzag transects.
Added the function plotStratum() for plotting the output from surveyPlanner().
Added the functions getProjString(), projectMatrixList(), spatial2matrixList(), matrixList2multipolygon(), multipolygon2spatial(), isSpatial(), isMatrixList(), isMultipolygon(), matrixListLevel(), rapplyKeepDataFrames() as utility functions for conversion to and from spatial objects, multipolygons, and lists of matrices, all containing polygons and other spatial data.
Added the functions geo2xy() for conversion to and from geographic and Cartesian coordinates, polyAreaOld() which is the old polyArea(), and getMatrixList(), getMultipolygon() and getSpatial() for getting a list of matrices, a mutipolygon wkt string or a spatial object respectively.
Mapped the new funcitons getMultipolygon() and getMatrixList() to the old funcitons matrix2multipolygon() multipolygon2matrix() for backwards compatibility.
Fixed bug in baseline2eca(), where the stratumNeighbour in the output was not created using matching but simple indexing of the strata present in the resources$covariateLink. Also now the neighbors of each present stratum is matched with the present strata.
Other minor bug fixes.
Added the parameter 'run' in getNMDdata(), which if set to FALSE only generates the project names, and does not download data and generate projects.
Added the function aggregateBySpeciesCategory() which generates a species matrix with biotic stations as rows and station information and the species present in a reference file as columns.
Added a check for missing not downloaded with getNMDdata().
Added support for using year or cruise code as 'subset' in getNMDdata().
Changed so that all matrix-like reference data downloaded using getNMDinfo() are represented as data.frame with numeric values wherever possible (when no NAs induced using as.numeric()).
Added the parameter modelType in the functions runBaseline(), getBaseline(), getProcess() and getBaselineParameters().
Fixed bug in getBaseline(), where data with incomplete comments (e.g., 'Ersfjorden-pumper 80 tonn til "Sklinnabanken') resulted in rows being dropped from the data.
Added "platformNumber" in getNMDinfo("v") and getNMDinfo("platform"), and changed the extraction of platforms when type="v" to all info of the latest 'validTo' value. When the 'validTo' is missing, the first row is returned, assuming there is only one row for these entries.
Added the function readBaselineFiles().
########## Version 1.9 (2018-04-18) (All changes from version 1.8) ##########
Removed the function baseline2ECA(), which is covered by baseline2eca().
Added the option of downloading all seralno from a year if serialno is not set.
Added the function surveyPlanner() used to generate parallel or zigzag transects.
Added the function plotStratum() for plotting the output from surveyPlanner().
Added the functions getProjString(), projectMatrixList(), spatial2matrixList(), matrixList2multipolygon(), multipolygon2spatial(), isSpatial(), isMatrixList(), isMultipolygon(), matrixListLevel(), rapplyKeepDataFrames() as utility functions for conversion to and from spatial objects, multipolygons, and lists of matrices, all containing polygons and other spatial data.
Added the functions geo2xy() for conversion to and from geographic and Cartesian coordinates, polyAreaOld() which is the old polyArea(), and getMatrixList(), getMultipolygon() and getSpatial() for getting a list of matrices, a mutipolygon wkt string or a spatial object respectively.
Mapped the new funcitons getMultipolygon() and getMatrixList() to the old funcitons matrix2multipolygon() multipolygon2matrix() for backwards compatibility.
Fixed bug in baseline2eca(), where the stratumNeighbour in the output was not created using matching but simple indexing of the strata present in the resources$covariateLink. Also now the neighbors of each present stratum is matched with the present strata.
Other minor bug fixes.
Added the parameter 'run' in getNMDdata(), which if set to FALSE only generates the project names, and does not download data and generate projects.
Added the function aggregateBySpeciesCategory() which generates a species matrix with biotic stations as rows and station information and the species present in a reference file as columns.
Added a check for missing not downloaded with getNMDdata().
Added support for using year or cruise code as 'subset' in getNMDdata().
Changed so that all matrix-like reference data downloaded using getNMDinfo() are represented as data.frame with numeric values wherever possible (when no NAs induced using as.numeric()).
Added the parameter modelType in the functions runBaseline(), getBaseline(), getProcess() and getBaselineParameters().
Fixed bug in getBaseline(), where data with incomplete comments (e.g., 'Ersfjorden-pumper 80 tonn til "Sklinnabanken') resulted in rows being dropped from the data.
Added "platformNumber" in getNMDinfo("v") and getNMDinfo("platform"), and changed the extraction of platforms when type="v" to all info of the latest 'validTo' value. When the 'validTo' is missing, the first row is returned, assuming there is only one row for these entries.
Added the function readBaselineFiles().
########## Version 1.9.1 (2019-02-01) ##########
Added support for NMD biotic API version 3 and biotic version 3.0 in getNMDdata(). Removed search for 'serialno'. Only full year files can be downloaded, but filtering on species through 'tsn' and serial number through 'serialno' is incorporated in the StoX project generated at download.
Added support for NMD reference API version 2 in getMNDinfo() and getNMDdata(). The output from getMNDinfo("platform") now coincides with that from getMNDinfo("v"), being a data frame with all entries of all platforms, where some platforms can have multiple entries. Before, getMNDinfo("v") returned only the last entry of each platform.
Changed the output of getNMDinfo("taxa") to have one column per species, with the scientific, norwegian, english and russian name as columns, as well as a column OldNames for old (non-preffered) names, given as strings such as "Norwegian: rødkrabbe, Scientific: Geryon tridens, English: red crab".
Added the functions prepareRECA(), runRECA() for preparing and running ECA (estimated catch at age), and plotRECA() and reportRECA() for plotting and reporting the results. These functions depend on the Reca package, which currently only works on Mac and Windows 7 (not Windows 10).
Added the functions writeBioticXML() and writeAcousticXML() (with supporting functions), which takes a data frame as input and writes the data frame to an XML file given XML-schema (XSD) files shipped along with Rstox. The input data frame has one column per combination of variable and attribute, where the attributes are coded into the column names in the following manner: variableName..attributeName.attributeValue. If there are variables with identical names at different levels in the XMl hierarchy, the level (i.e., the name of the parent node) can be given in the column name by separation of a dot: variableName.level.
Added the option getMNDinfo("cruise") or getMNDinfo("cruises"), for returning a list of all cruises containing biotic data.
Added the function prepareDATRAS() for converting a biotic file to a DATRAS csv file. The function is included in the StoX template DATRAS conversion.
Added the function closeAllProjects().
Changed the parameter 'margin' in plotStratum() to the new parameter 'zoom', which has default 1.5 and where 1 indicates no zooming, The old parameter named 'zoom' has been removed along with the parameter 'google' for Google-maps type of plots due to new requirements for users to create an API project and get this authorized.
Added the function exportDatras() which takes the output from a baseline model including the StoX function DATRASConvert and exports a DATRAS file. In the current version only one biotic file can be included in the project.
Increased default memory from 2 to 6 GB to accommodate ECA projects, which are generally large.
Fixed bug in getNMDinfo("v"), where the returned data frame only contained NA.
Fixed bug in surveyPlanner(), where the output data frame 'Transect' contained stratum indices instead of stratum names.
Fixed bug in plotStratum(), where transect=FLASE did not suppress plotting transects, whereas transect=NULL did. In the new version all values other than TRUE suppresses plotting transects.
Fixed bug in getNMDinfo("platform") and getNMDinfo("v"), where the columns validFrom and validTo did not correspond to the correct platform codes/names due to a sorting of these dates.
Fixed bug in getNMDinfo, where UTF-8 encoding was ineffective (the corresponding bugfix in Version 1.3.2 was discovered to be ineffective).
Removed error in readStrataPolygons(), where multipolygons were not supported. Now only the first polygon of multipolygons are kept in the outputs 'lonlat' and 'lonlatAll', and all are kept in 'lonlatFull'.
Changed surveyPlanner() to discard strata with zero effort, but keep those strata in the Input list for plotting.
Added the parameter "JavaMem" in bootstrap functions, used for setting the Java memory of each bootstrap replicate (useful to reduce memory for parallelized bootstrapping).
Removed LICENSE file, as this is unambigously stated in the DESCRIPTION file.
Changed from using 'formulardato' to using 'sistefangstdato' in baseline2eca().
Fixed bug in runBaseline(), where exportCSV==TRUE now implies resetting (and rerunning) the baseline.
Changed 'covariateLink' in the output from baseline2eca() to link to the union of the covariate values in biotic and landing (and not only to landing as before). Also changed name of the thrid column of the data frames in covariateDefinition from "Value" to "Definition".
Removed the covariate 'season', which was used in conjunction to 'year'. Now, these are concatinated in the temporal covariate.
Changed the name of baseline2eca() to getCovData(). The old function kept for backwards compatibility.
Removed the option 'quiet' in downloadXML(), which is replaced by 'msg'.
Avoided strange behavior by rgeos::readWKT() on Windows, where long strings were "unable to parse" (500 charaters).
Fixed bug in runBaseline(), where when reset=TRUE, and startProcess was a later process than the first process to be changed using parlist or ..., the baseline was not run from that first process, but from the specified startProcess. Using parlist or ... now forces running the baseline from the first necessary process.
Cleaned up how startProcess and endProcess interacts with 'reset' and the unrun and changed processes. The documentation updated with the following: The parameters startProcess and endProcess specify the range of processes to run (startProcess : endProcess). If the model has been run already for all or some of the processes in this range, only the unrun processes are run. If there are processes in or prior to this range for which parameters have changed, all processes from the first changed process and throughout the range startProcess : endProcess are rerun. The range of processes to run is extended to any changed processes beyond the range. If reset=TRUE, the range or processes to run is extended to the range startProcess : endProcess regardless of whether the processes have previouslu been run.
Added the predefined values as attributes to the parameter values returned from getBaseline().
Changed default of keepMissing to TRUE in readBaselineParametersJava(), thus including all parameters, even those which are not set when running getBaseline().
Renamed the parameter 'API' to 'server' in getNMDinfo() and getNMDdata(). No backwards compatibility.
Fixed bug with Java v11.
Fixed bug with subset in getNMDdata().
########## Version 1.9.3 (2019-02-07) ##########
Fixed bug in createProject(), where template now can be given as the first element of a list of processes in 'model'.
########## Version 1.9.4 (2019-02-08) ##########
Fixed bug with parallel R sessions run by StoX writing to and sourcing the same temporary R script at once. This is solved by the argument tempRScriptFileName.
########## Version 1.10 (2019-02-07) ##########
(Identical to NEWS for Rstox_1.10)
Added support for NMD biotic API version 3 and biotic version 3.0 in getNMDdata(). Removed search for 'serialno'. Only full year files can be downloaded, but filtering on species through 'tsn' and serial number through 'serialno' is incorporated in the StoX project generated at download.
Added support for NMD reference API version 2 in getMNDinfo() and getNMDdata(). The output from getMNDinfo("platform") now coincides with that from getMNDinfo("v"), being a data frame with all entries of all platforms, where some platforms can have multiple entries. Before, getMNDinfo("v") returned only the last entry of each platform.
Changed the output of getNMDinfo("taxa") to have one column per species, with the scientific, norwegian, english and russian name as columns, as well as a column OldNames for old (non-preffered) names, given as strings such as "Norwegian: rødkrabbe, Scientific: Geryon tridens, English: red crab".
Added the functions prepareRECA(), runRECA() for preparing and running ECA (estimated catch at age), and plotRECA() and reportRECA() for plotting and reporting the results. These functions depend on the Reca package, which currently only works on Mac and Windows 7 (not Windows 10).
Added the functions writeBioticXML() and writeAcousticXML() (with supporting functions), which takes a data frame as input and writes the data frame to an XML file given XML-schema (XSD) files shipped along with Rstox. The input data frame has one column per combination of variable and attribute, where the attributes are coded into the column names in the following manner: variableName..attributeName.attributeValue. If there are variables with identical names at different levels in the XMl hierarchy, the level (i.e., the name of the parent node) can be given in the column name by separation of a dot: variableName.level.
Added the option getMNDinfo("cruise") or getMNDinfo("cruises"), for returning a list of all cruises containing biotic data.
Added the function prepareDATRAS() for converting a biotic file to a DATRAS csv file. The function is included in the StoX template DATRAS conversion.
Added the function closeAllProjects().
Changed the parameter 'margin' in plotStratum() to the new parameter 'zoom', which has default 1.5 and where 1 indicates no zooming, The old parameter named 'zoom' has been removed along with the parameter 'google' for Google-maps type of plots due to new requirements for users to create an API project and get this authorized.
Added the function exportDatras() which takes the output from a baseline model including the StoX function DATRASConvert and exports a DATRAS file. In the current version only one biotic file can be included in the project.
Increased default memory from 2 to 6 GB to accommodate ECA projects, which are generally large.
Fixed bug in getNMDinfo("v"), where the returned data frame only contained NA.
Fixed bug in surveyPlanner(), where the output data frame 'Transect' contained stratum indices instead of stratum names.
Fixed bug in plotStratum(), where transect=FLASE did not suppress plotting transects, whereas transect=NULL did. In the new version all values other than TRUE suppresses plotting transects.
Fixed bug in getNMDinfo("platform") and getNMDinfo("v"), where the columns validFrom and validTo did not correspond to the correct platform codes/names due to a sorting of these dates.
Fixed bug in getNMDinfo, where UTF-8 encoding was ineffective (the corresponding bugfix in Version 1.3.2 was discovered to be ineffective).
Removed error in readStrataPolygons(), where multipolygons were not supported. Now only the first polygon of multipolygons are kept in the outputs 'lonlat' and 'lonlatAll', and all are kept in 'lonlatFull'.
Changed surveyPlanner() to discard strata with zero effort, but keep those strata in the Input list for plotting.
Added the parameter "JavaMem" in bootstrap functions, used for setting the Java memory of each bootstrap replicate (useful to reduce memory for parallelized bootstrapping).
Removed LICENSE file, as this is unambigously stated in the DESCRIPTION file.
Changed from using 'formulardato' to using 'sistefangstdato' in baseline2eca().
Fixed bug in runBaseline(), where exportCSV==TRUE now implies resetting (and rerunning) the baseline.
Changed 'covariateLink' in the output from baseline2eca() to link to the union of the covariate values in biotic and landing (and not only to landing as before). Also changed name of the thrid column of the data frames in covariateDefinition from "Value" to "Definition".
Removed the covariate 'season', which was used in conjunction to 'year'. Now, these are concatinated in the temporal covariate.
Changed the name of baseline2eca() to getCovData(). The old function kept for backwards compatibility.
Removed the option 'quiet' in downloadXML(), which is replaced by 'msg'.
Avoided strange behavior by rgeos::readWKT() on Windows, where long strings were "unable to parse" (500 charaters).
Fixed bug in runBaseline(), where when reset=TRUE, and startProcess was a later process than the first process to be changed using parlist or ..., the baseline was not run from that first process, but from the specified startProcess. Using parlist or ... now forces running the baseline from the first necessary process.
Cleaned up how startProcess and endProcess interacts with 'reset' and the unrun and changed processes. The documentation updated with the following: The parameters startProcess and endProcess specify the range of processes to run (startProcess : endProcess). If the model has been run already for all or some of the processes in this range, only the unrun processes are run. If there are processes in or prior to this range for which parameters have changed, all processes from the first changed process and throughout the range startProcess : endProcess are rerun. The range of processes to run is extended to any changed processes beyond the range. If reset=TRUE, the range or processes to run is extended to the range startProcess : endProcess regardless of whether the processes have previouslu been run.
Added the predefined values as attributes to the parameter values returned from getBaseline().
Changed default of keepMissing to TRUE in readBaselineParametersJava(), thus including all parameters, even those which are not set when running getBaseline().
Renamed the parameter 'API' to 'server' in getNMDinfo() and getNMDdata(). No backwards compatibility.
Fixed bug with Java v11.
Fixed bug with subset in getNMDdata().
Fixed bug in createProject(), where template now can be given as the first element of a list of processes in 'model'.
Fixed bug with parallel R sessions run by StoX writing to and sourcing the same temporary R script at once. This is solved by the argument tempRScriptFileName.
########## Version 1.11 (2019-02-08) ##########
Added support for NMD biotic API version 3 and biotic version 3.0 in getNMDdata(). Removed search for 'serialno'. Only full year files can be downloaded, but filtering on species through 'tsn' and serial number through 'serialno' is incorporated in the StoX project generated at download.
Added support for NMD reference API version 2 in getMNDinfo() and getNMDdata(). The output from getMNDinfo("platform") now coincides with that from getMNDinfo("v"), being a data frame with all entries of all platforms, where some platforms can have multiple entries. Before, getMNDinfo("v") returned only the last entry of each platform.
Changed the output of getNMDinfo("taxa") to have one column per species, with the scientific, norwegian, english and russian name as columns, as well as a column OldNames for old (non-preffered) names, given as strings such as "Norwegian: rødkrabbe, Scientific: Geryon tridens, English: red crab".
Added the functions prepareRECA(), runRECA() for preparing and running ECA (estimated catch at age), and plotRECA() and reportRECA() for plotting and reporting the results. These functions depend on the Reca package, which currently only works on Mac and Windows 7 (not Windows 10).
Added the functions writeBioticXML() and writeAcousticXML() (with supporting functions), which takes a data frame as input and writes the data frame to an XML file given XML-schema (XSD) files shipped along with Rstox. The input data frame has one column per combination of variable and attribute, where the attributes are coded into the column names in the following manner: variableName..attributeName.attributeValue. If there are variables with identical names at different levels in the XMl hierarchy, the level (i.e., the name of the parent node) can be given in the column name by separation of a dot: variableName.level.
Added the option getMNDinfo("cruise") or getMNDinfo("cruises"), for returning a list of all cruises containing biotic data.
Added the function prepareDATRAS() for converting a biotic file to a DATRAS csv file. The function is included in the StoX template DATRAS conversion.
Added the function closeAllProjects().
Changed the parameter 'margin' in plotStratum() to the new parameter 'zoom', which has default 1.5 and where 1 indicates no zooming, The old parameter named 'zoom' has been removed along with the parameter 'google' for Google-maps type of plots due to new requirements for users to create an API project and get this authorized.
Added the function exportDatras() which takes the output from a baseline model including the StoX function DATRASConvert and exports a DATRAS file. In the current version only one biotic file can be included in the project.
Increased default memory from 2 to 6 GB to accommodate ECA projects, which are generally large.
Fixed bug in getNMDinfo("v"), where the returned data frame only contained NA.
Fixed bug in surveyPlanner(), where the output data frame 'Transect' contained stratum indices instead of stratum names.
Fixed bug in plotStratum(), where transect=FLASE did not suppress plotting transects, whereas transect=NULL did. In the new version all values other than TRUE suppresses plotting transects.
Fixed bug in getNMDinfo("platform") and getNMDinfo("v"), where the columns validFrom and validTo did not correspond to the correct platform codes/names due to a sorting of these dates.
Fixed bug in getNMDinfo, where UTF-8 encoding was ineffective (the corresponding bugfix in Version 1.3.2 was discovered to be ineffective).
Removed error in readStrataPolygons(), where multipolygons were not supported. Now only the first polygon of multipolygons are kept in the outputs 'lonlat' and 'lonlatAll', and all are kept in 'lonlatFull'.
Changed surveyPlanner() to discard strata with zero effort, but keep those strata in the Input list for plotting.
Added the parameter "JavaMem" in bootstrap functions, used for setting the Java memory of each bootstrap replicate (useful to reduce memory for parallelized bootstrapping).
Removed LICENSE file, as this is unambigously stated in the DESCRIPTION file.
Changed from using 'formulardato' to using 'sistefangstdato' in baseline2eca().
Fixed bug in runBaseline(), where exportCSV==TRUE now implies resetting (and rerunning) the baseline.
Changed 'covariateLink' in the output from baseline2eca() to link to the union of the covariate values in biotic and landing (and not only to landing as before). Also changed name of the thrid column of the data frames in covariateDefinition from "Value" to "Definition".
Removed the covariate 'season', which was used in conjunction to 'year'. Now, these are concatinated in the temporal covariate.
Changed the name of baseline2eca() to getCovData(). The old function kept for backwards compatibility.
Removed the option 'quiet' in downloadXML(), which is replaced by 'msg'.
Avoided strange behavior by rgeos::readWKT() on Windows, where long strings were "unable to parse" (500 charaters).
Fixed bug in runBaseline(), where when reset=TRUE, and startProcess was a later process than the first process to be changed using parlist or ..., the baseline was not run from that first process, but from the specified startProcess. Using parlist or ... now forces running the baseline from the first necessary process.
Cleaned up how startProcess and endProcess interacts with 'reset' and the unrun and changed processes. The documentation updated with the following: The parameters startProcess and endProcess specify the range of processes to run (startProcess : endProcess). If the model has been run already for all or some of the processes in this range, only the unrun processes are run. If there are processes in or prior to this range for which parameters have changed, all processes from the first changed process and throughout the range startProcess : endProcess are rerun. The range of processes to run is extended to any changed processes beyond the range. If reset=TRUE, the range or processes to run is extended to the range startProcess : endProcess regardless of whether the processes have previouslu been run.
Added the predefined values as attributes to the parameter values returned from getBaseline().
Changed default of keepMissing to TRUE in readBaselineParametersJava(), thus including all parameters, even those which are not set when running getBaseline().
Renamed the parameter 'API' to 'server' in getNMDinfo() and getNMDdata(). No backwards compatibility.
Fixed bug with Java v11.
Fixed bug with subset in getNMDdata().
Fixed bug in createProject(), where template now can be given as the first element of a list of processes in 'model'.
Fixed bug with parallel R sessions run by StoX writing to and sourcing the same temporary R script at once. This is solved by the argument tempRScriptFileName.