@@ -80,8 +80,8 @@ get_vegplot_from_NASIS_db <- function(SS = TRUE,
80
80
}
81
81
82
82
83
- # get location data from the corresponding record in the site table
84
83
# ' @export
84
+ # ' @return `get_vegplot_location_from_NASIS_db()`: a data.frame containing location data from the corresponding record in the site table
85
85
# ' @rdname fetchVegdata
86
86
get_vegplot_location_from_NASIS_db <- function (SS = TRUE ,
87
87
stringsAsFactors = NULL ,
@@ -149,7 +149,7 @@ get_vegplot_location_from_NASIS_db <- function(SS = TRUE,
149
149
150
150
151
151
152
- # get Rangeland Health Indicator(RHI) associated fields in the vegplot table
152
+ # ' @return `get_vegplot_trhi_from_NASIS_db()`: a data.frame containing Rangeland Health Indicator (RHI) data from the ` vegplot` table
153
153
# ' @export
154
154
# ' @rdname fetchVegdata
155
155
get_vegplot_trhi_from_NASIS_db <- function (SS = TRUE ,
@@ -195,8 +195,7 @@ get_vegplot_trhi_from_NASIS_db <- function(SS = TRUE,
195
195
return (d )
196
196
}
197
197
198
-
199
- # get vegplot species - this is a reconstruction of a site existing species list
198
+ # ' @return `get_vegplot_species_from_NASIS_db()`: a data.frame containing Plot Plant Inventory data
200
199
# ' @export
201
200
# ' @rdname fetchVegdata
202
201
get_vegplot_species_from_NASIS_db <- function (SS = TRUE ,
@@ -251,7 +250,7 @@ get_vegplot_species_from_NASIS_db <- function(SS = TRUE,
251
250
}
252
251
253
252
254
- # get vegplot transect data
253
+ # ' @return `get_vegplot_transect_from_NASIS_db()`: a data.frame containing Vegetation Transect data
255
254
# ' @export
256
255
# ' @rdname fetchVegdata
257
256
get_vegplot_transect_from_NASIS_db <- function (SS = TRUE ,
@@ -318,7 +317,7 @@ get_vegplot_transect_from_NASIS_db <- function(SS = TRUE,
318
317
}
319
318
320
319
321
- # get vegplot transect species data
320
+ # ' @return `get_vegplot_transect_from_NASIS_db()`: a data.frame containing Vegetation Transect Plant Summary data
322
321
# ' @export
323
322
# ' @rdname fetchVegdata
324
323
get_vegplot_transpecies_from_NASIS_db <- function (SS = TRUE ,
@@ -390,7 +389,7 @@ get_vegplot_transpecies_from_NASIS_db <- function(SS = TRUE,
390
389
return (d )
391
390
}
392
391
393
- # get point plant cover details for vegtransect plant summary
392
+ # ' @return `get_vegplot_transpoints_from_NASIS_db()`: a data.frame containing Vegetation Transect Point Plant Cover Details
394
393
# ' @export
395
394
# ' @rdname fetchVegdata
396
395
get_vegplot_transpoints_from_NASIS_db <- function (SS = TRUE , dsn = NULL ) {
@@ -418,8 +417,7 @@ get_vegplot_transpoints_from_NASIS_db <- function(SS = TRUE, dsn = NULL) {
418
417
uncode(res )
419
418
}
420
419
421
-
422
- # get vegplot transect production quadrats
420
+ # ' @return `get_vegplot_prodquadrats_from_NASIS_db()`: a data.frame containing Vegetation Transect Production Quadrat data
423
421
# ' @export
424
422
# ' @rdname fetchVegdata
425
423
get_vegplot_prodquadrats_from_NASIS_db <- function (SS = TRUE , dsn = NULL ) {
@@ -448,7 +446,35 @@ get_vegplot_prodquadrats_from_NASIS_db <- function(SS = TRUE, dsn = NULL) {
448
446
uncode(res )
449
447
}
450
448
451
- # get vegplot tree site index summary data
449
+
450
+ # ' @return `get_vegplot_groundsurface_from_NASIS_db()`: a data.frame containing summary data for line point intercept ground surface cover hits by cover type.
451
+ # ' @export
452
+ # ' @rdname fetchVegdata
453
+ # ' @examplesIf local_NASIS_defined()
454
+ # ' \donttest{
455
+ # ' vsurf <- get_vegplot_groundsurface_from_NASIS_db()
456
+ # ' }
457
+ get_vegplot_groundsurface_from_NASIS_db <- function (SS = TRUE , dsn = NULL ) {
458
+ q <- " SELECT siteiid, siteobsiid, vegplotid, vegplotname, vegtransectid, vt.totalpointssampledcount, vt.transectlength, groundsurfcovtype, groundcoverptcount, groundcoverptpct, quadratsize, quadratshape, groundcoverquadpctave
459
+ FROM site_View_1 AS s
460
+ INNER JOIN siteobs_View_1 AS so ON so.siteiidref=s.siteiid
461
+ INNER JOIN vegplot_View_1 AS v ON v.siteobsiidref=so.siteobsiid
462
+ INNER JOIN vegtransect_View_1 AS vt
463
+ ON vt.vegplotiidref = v.vegplotiid
464
+ LEFT JOIN transectgroundsurfcover_View_1 AS vtps
465
+ ON vtps.vegtransectiidref = vt.vegtransectiid"
466
+ # LEFT JOIN groundsurfcovdetails_View_1 AS vtpsd
467
+ # ON vtpsd.transectgrsurfcoviidref = vtps.transectgroundsurfcoveriid
468
+
469
+ if (! SS ) {
470
+ q <- gsub(" _View_1" , " " , q )
471
+ }
472
+
473
+ res <- dbQueryNASIS(NASIS(dsn = dsn ), q )
474
+ uncode(res )
475
+ }
476
+
477
+ # ' @return `get_vegplot_tree_si_summary_from_NASIS_db()`: a data.frame containing Vegetation Plot Tree Site Index Summary data
452
478
# ' @export
453
479
# ' @rdname fetchVegdata
454
480
get_vegplot_tree_si_summary_from_NASIS_db <- function (SS = TRUE ,
@@ -495,7 +521,7 @@ get_vegplot_tree_si_summary_from_NASIS_db <- function(SS = TRUE,
495
521
return (d )
496
522
}
497
523
498
- # get vegplot species basal area
524
+ # ' @return `get_vegplot_speciesbasalarea_from_NASIS()`: a data.frame containing Vegetation Plot Species Basal Area and Trees Counted data
499
525
# ' @export
500
526
# ' @rdname fetchVegdata
501
527
get_vegplot_speciesbasalarea_from_NASIS <- function (SS = TRUE , dsn = NULL ) {
@@ -524,7 +550,7 @@ get_vegplot_speciesbasalarea_from_NASIS <- function(SS = TRUE, dsn = NULL) {
524
550
uncode(dbQueryNASIS(channel , q ), dsn = dsn )
525
551
}
526
552
527
- # get vegplot tree site index details data
553
+ # ' @return `get_vegplot_tree_si_details_from_NASIS_db()`: a data.frame containing Vegetation Plot Tree Site Index Details data
528
554
# ' @export
529
555
# ' @rdname fetchVegdata
530
556
get_vegplot_tree_si_details_from_NASIS_db <- function (SS = TRUE ,
@@ -573,7 +599,7 @@ get_vegplot_tree_si_details_from_NASIS_db <- function(SS = TRUE,
573
599
}
574
600
575
601
576
- # get vegplot textnotes
602
+ # ' @return `get_vegplot_textnote_from_NASIS_db()`: a data.frame containing Vegetation Plot text notes
577
603
# ' @param fixLineEndings Replace `'\r\n'` with `'\n'`; Default: `TRUE`
578
604
# ' @export
579
605
# ' @rdname fetchVegdata
0 commit comments