Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in complete.cases(x.neg, x.pos, y.neg, y.pos) : object 'x.neg' not found #8

Open
VincentYang147 opened this issue Oct 20, 2022 · 10 comments

Comments

@VincentYang147
Copy link

    > When I use this model, I recieved this:

Running correlations among explanatory variables...
Error in complete.cases(x.neg, x.pos, y.neg, y.pos) :
object 'x.neg' not found

Traceback:
23: complete.cases(x.neg, x.pos, y.neg, y.pos)
22: eval(substitute(expr), data, enclos = parent.frame())
21: eval(substitute(expr), data, enclos = parent.frame())
20: with.default(out, {
good <- complete.cases(x.neg, x.pos, y.neg, y.pos)
envelope(x.neg[good], x.pos[good], y.neg[good], y.pos[good],
col = col.spread, alpha = alpha, border = border)
})
19: with(out, {
good <- complete.cases(x.neg, x.pos, y.neg, y.pos)
envelope(x.neg[good], x.pos[good], y.neg[good], y.pos[good],
col = col.spread, alpha = alpha, border = border)
})
18: smoother(x[subs], y[subs], col = smoother.args$col[i], log.x = FALSE,
log.y = FALSE, spread = spread, smoother.args = smoother.args)
17: lower.panel(...)
16: localLowerPanel(as.vector(x[, j]), as.vector(x[, i]), ...)
15: pairs.default(x, labels = var.labels, cex.axis = cex.axis, cex.main = cex.main,
cex.labels = cex.labels, cex = cex, diag.panel = diag, row1attop = row1attop,
panel = function(x, y, ...) {
for (i in 1:n.groups) {
subs <- groups == levels(groups)[i]
if (plot.points)
points(x[subs], y[subs], pch = pch[i], col = col[if (n.groups ==
1)
1
else i], cex = cex)
if (by.groups) {
if (is.function(smoother))
smoother(x[subs], y[subs], col = smoother.args$col[i],
log.x = FALSE, log.y = FALSE, spread = spread,
smoother.args = smoother.args)
if (is.function(reg.line))
regLine(reg.line(y[subs] ~ x[subs]), lty = lty,
lwd = lwd, col = regLine.args$col[i])
if (ellipse)
dataEllipse(x[subs], y[subs], plot.points = FALSE,
...
14: pairs(x, labels = var.labels, cex.axis = cex.axis, cex.main = cex.main,
cex.labels = cex.labels, cex = cex, diag.panel = diag, row1attop = row1attop,
panel = function(x, y, ...) {
for (i in 1:n.groups) {
subs <- groups == levels(groups)[i]
if (plot.points)
points(x[subs], y[subs], pch = pch[i], col = col[if (n.groups ==
1)
1
else i], cex = cex)
if (by.groups) {
if (is.function(smoother))
smoother(x[subs], y[subs], col = smoother.args$col[i],
log.x = FALSE, log.y = FALSE, spread = spread,
smoother.args = smoother.args)
if (is.function(reg.line))
regLine(reg.line(y[subs] ~ x[subs]), lty = lty,
lwd = lwd, col = regLine.args$col[i])
if (ellipse)
dataEllipse(x[subs], y[subs], plot.points = FALSE,
...
13: scatterplotMatrix.default(sdf, diagonal = "boxplot", reg.line = FALSE,
use = "pairwise.complete.obs", spread = FALSE, smooth = TRUE)
12: scatterplotMatrix(sdf, diagonal = "boxplot", reg.line = FALSE,
use = "pairwise.complete.obs", spread = FALSE, smooth = TRUE)
11: correlationMatrix(file.output.list, SelParmValues, subdata)
10: startModelRun(file.output.list, if_estimate, if_estimate_simulation,
if_boot_estimate, if_boot_predict, enable_ShinyApp, filter_data1_conditions,
data1, if_userModifyData, data_names, class.input.list, min.sites.list,
if_validate, iseed, pvalidate, mapping.input.list, estimate.input.list,
if_predict, biters, scenario.input.list, compare_models,
modelComparison_name, if_spatialAutoCorr, add_vars, batch_mode,
RSPARROW_errorOption)
9: executeRSPARROW(settingValues = lapply(settingsEnv, get), settingNames = settingsEnv,
activeFile, envir = .GlobalEnv)
8: eval(ei, envir)
7: eval(ei, envir)
6: withVisible(eval(ei, envir))
5: source(paste(path_master, "/R/runRsparrow.R", sep = ""))
4: eval(ei, envir)
3: eval(ei, envir)
2: withVisible(eval(ei, envir))
1: source("E:/Coding/R/RSPARROW_UserTutorial/results/sparrow_control.R")

@ShuaiGe57
Copy link

Use the data in Model1 ~ 8 instead of the default data in results

@KlausWu
Copy link

KlausWu commented Jun 8, 2023

Do you mean the data in excle? Such as using Model1_dataDictionary to replace the dataDictionary

Use the data in Model1 ~ 8 instead of the default data in results

@ShuaiGe57
Copy link

Do you mean the data in excle? Such as using Model1_dataDictionary to replace the dataDictionary

Use the data in Model1 ~ 8 instead of the default data in results

yes,include the control file

@KlausWu
Copy link

KlausWu commented Jun 9, 2023

Do you mean the data in excle? Such as using Model1_dataDictionary to replace the dataDictionary

Use the data in Model1 ~ 8 instead of the default data in results

yes,include the control file
Thank you very much! It worked!

@zingzxyang
Copy link

Do you mean the data in excle? Such as using Model1_dataDictionary to replace the dataDictionary

Use the data in Model1 ~ 8 instead of the default data in results

yes,include the control file
Thank you very much! It worked!

hello, please tell me more details about how to use Model1_dataDictionary to replace the dataDictionary, thank you very much!!!

@KlausWu
Copy link

KlausWu commented Jul 16, 2023

Just copy and pasete all the file in Model1 file.

@zingzxyang
Copy link

Just copy and pasete all the file in Model1 file.

ok, thank you so much! I have successfully solved this problem and ran the model.

@KlausWu
Copy link

KlausWu commented Dec 1, 2023

Do you mean the data in excle? Such as using Model1_dataDictionary to replace the dataDictionary

Use the data in Model1 ~ 8 instead of the default data in results

yes,include the control file

> When I use my own data, I recieved this:

Error in calcDemtareaClass(sitedata$demtarea) (from calcDemtareaClass.R#30) :
object 'demtarea.class' not found

Traceback:
11: calcDemtareaClass(sitedata$demtarea)
10: startModelRun(file.output.list, if_estimate, if_estimate_simulation,
if_boot_estimate, if_boot_predict, enable_ShinyApp, filter_data1_conditions,
data1, if_userModifyData, data_names, class.input.list, min.sites.list,
if_validate, iseed, pvalidate, mapping.input.list, estimate.input.list,
if_predict, biters, scenario.input.list, compare_models,
modelComparison_name, if_spatialAutoCorr, add_vars, batch_mode,
RSPARROW_errorOption)
9: executeRSPARROW(settingValues = lapply(settingsEnv, get), settingNames = settingsEnv,
activeFile, envir = .GlobalEnv)
8: eval(ei, envir)
7: eval(ei, envir)
6: withVisible(eval(ei, envir))
5: source(paste(path_master, "/R/runRsparrow.R", sep = ""))
4: eval(ei, envir)
3: eval(ei, envir)
2: withVisible(eval(ei, envir))
1: source("E:/SPARROWyax/rsparrow-master/UserTutorial/results/sparrow_control.R")

RSPARROW SYSTEM ERROR OCCURRED
To reset user options in R use options(backupOptions)

Can you give me some advice ,thanks!

@ShuaiGe57
Copy link

does your data.csv file has demtarea column?

@KlausWu
Copy link

KlausWu commented Dec 1, 2023

does your data.csv file has demtarea column?

Yes!And each subwatershed has a corresponding value. QAQ
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants