Skip to content

Commit

Permalink
Patch for #240
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag committed Mar 9, 2022
1 parent 0391faa commit ad4d037
Show file tree
Hide file tree
Showing 23 changed files with 412 additions and 412 deletions.
152 changes: 76 additions & 76 deletions R/SDA-spatial.R

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions R/fetchNASIS.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ fetchNASIS <- function(from = 'pedons',

res <- NULL

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down
32 changes: 16 additions & 16 deletions R/fetchNASISWebReport.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
fetchNASISWebReport <- function(projectname, rmHzErrors = FALSE, fill = FALSE,
stringsAsFactors = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -96,8 +96,8 @@ fetchNASISWebReport <- function(projectname, rmHzErrors = FALSE, fill = FALSE,
#' @rdname fetchNASISWebReport
get_component_from_NASISWebReport <- function(projectname, stringsAsFactors = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -134,8 +134,8 @@ get_component_from_NASISWebReport <- function(projectname, stringsAsFactors = NU
#' @rdname fetchNASISWebReport
get_chorizon_from_NASISWebReport <- function(projectname, fill = FALSE, stringsAsFactors = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -181,8 +181,8 @@ get_chorizon_from_NASISWebReport <- function(projectname, fill = FALSE, stringsA
#' @rdname fetchNASISWebReport
get_legend_from_NASISWebReport <- function(mlraoffice, areasymbol, droplevels = TRUE, stringsAsFactors = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -213,8 +213,8 @@ get_legend_from_NASISWebReport <- function(mlraoffice, areasymbol, droplevels =
#' @rdname fetchNASISWebReport
get_lmuaoverlap_from_NASISWebReport <- function(areasymbol, droplevels = TRUE, stringsAsFactors = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -245,8 +245,8 @@ get_lmuaoverlap_from_NASISWebReport <- function(areasymbol, droplevels = TRUE, s
#' @rdname fetchNASISWebReport
get_mapunit_from_NASISWebReport <- function(areasymbol, droplevels = TRUE, stringsAsFactors = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -277,8 +277,8 @@ get_mapunit_from_NASISWebReport <- function(areasymbol, droplevels = TRUE, strin
#' @rdname fetchNASISWebReport
get_projectmapunit_from_NASISWebReport <- function(projectname, stringsAsFactors = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -306,8 +306,8 @@ get_projectmapunit_from_NASISWebReport <- function(projectname, stringsAsFactors
get_projectmapunit2_from_NASISWebReport <- function(mlrassoarea, fiscalyear, projectname, stringsAsFactors = NULL) {


if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down
4 changes: 2 additions & 2 deletions R/fetchNASIS_components.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
dsn = NULL) {


if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down
4 changes: 2 additions & 2 deletions R/fetchNASIS_pedons.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
dsn = NULL
) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down
12 changes: 6 additions & 6 deletions R/fetchNASIS_report.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
stringsAsFactors = NULL
) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -137,8 +137,8 @@
.get_site_from_NASISReport <- function(url = NULL, nullFragsAreZero = TRUE, stringsAsFactors = NULL
) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -184,8 +184,8 @@

.get_pediagfeatures_from_NASISTemp <- function(stringsAsFactors = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down
4 changes: 2 additions & 2 deletions R/fetchVegdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#'
fetchVegdata <- function(SS=TRUE, stringsAsFactors = NULL, dsn = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down
20 changes: 10 additions & 10 deletions R/get_component_data_from_NASIS_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ get_component_data_from_NASIS_db <- function(SS = TRUE,
nullFragsAreZero = TRUE,
stringsAsFactors = NULL,
dsn = NULL) {
if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -175,8 +175,8 @@ get_component_correlation_data_from_NASIS_db <- function(SS = TRUE,
stringsAsFactors = NULL,
dsn = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -319,8 +319,8 @@ get_component_copm_data_from_NASIS_db <- function(SS = TRUE,
stringsAsFactors = NULL,
dsn = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -359,8 +359,8 @@ get_component_esd_data_from_NASIS_db <- function(SS = TRUE,
stringsAsFactors = NULL,
dsn = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -475,8 +475,8 @@ get_comonth_from_NASIS_db <- function(SS = TRUE,
fill = FALSE,
stringsAsFactors = NULL,
dsn = NULL) {
if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down
20 changes: 10 additions & 10 deletions R/get_component_from_SDA.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ get_component_from_SDA <- function(WHERE = NULL, duplicates = FALSE, childs = TR
droplevels = TRUE, nullFragsAreZero = TRUE,
stringsAsFactors = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -336,8 +336,8 @@ get_cointerp_from_SDA <- function(WHERE = NULL, mrulename = NULL, duplicates = F
stringsAsFactors = NULL
) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -464,8 +464,8 @@ get_mapunit_from_SDA <- function(WHERE = NULL,
droplevels = TRUE,
stringsAsFactors = NULL
) {
if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -525,8 +525,8 @@ get_chorizon_from_SDA <- function(WHERE = NULL, duplicates = FALSE,
droplevels = TRUE,
stringsAsFactors = NULL
) {
if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down Expand Up @@ -809,8 +809,8 @@ fetchSDA <- function(WHERE = NULL, duplicates = FALSE, childs = TRUE,
stringsAsFactors = NULL
) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down
4 changes: 2 additions & 2 deletions R/get_concentrations_from_NASIS_db.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
get_concentrations_from_NASIS_db <- function(SS=TRUE, stringsAsFactors = NULL, dsn = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down
4 changes: 2 additions & 2 deletions R/get_cosoilmoist_from_LIMS.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
get_cosoilmoist_from_NASISWebReport <- function(projectname, impute = TRUE, stringsAsFactors = NULL) {

if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down
4 changes: 2 additions & 2 deletions R/get_cosoilmoist_from_NASIS.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ get_cosoilmoist_from_NASIS <- function(SS = TRUE,
dsn = NULL) {


if (!missing(stringsAsFactors) && stringsAsFactors) {
.Deprecated(msg = "stringsAsFactors = TRUE argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(TRUE)`")
if (!missing(stringsAsFactors) && is.logical(stringsAsFactors)) {
.Deprecated(msg = sprintf("stringsAsFactors argument is deprecated.\nSetting package option with `NASISDomainsAsFactor(%s)`", stringsAsFactors))
NASISDomainsAsFactor(stringsAsFactors)
}

Expand Down
Loading

0 comments on commit ad4d037

Please sign in to comment.