Closed DanWismer closed 2 months ago
Your call looks OK. Did you check the nrow(x) and ncol(x) ?
Douglas Nychka Personal email Cell 3037253199
From: Dan Wismer @.> Date: Friday, August 23, 2024 at 10:46 AM To: dnychka/fieldsRPackage @.> Cc: Subscribed @.***> Subject: [dnychka/fieldsRPackage] fields::circulantEmbeddingSetup question (Issue #6)
Hi,
I am getting this error if (any(d < 0)) stop("distance argument must be nonnegative"): missing value where TRUE/FALSE needed when running the follow function:
obj <- fields::circulantEmbeddingSetup(
grid = list(
x = seq(0, 5, length.out = terra::nrow(x)),
y = seq(0, 5, length.out = terra::ncol(x))
),
Covariance = "Exponential",
aRange = scale
)
I am unsure how to debug this one. Wondering if you had any suggestions?
Thanks!
— Reply to this email directly, view it on GitHubhttps://github.com/dnychka/fieldsRPackage/issues/6, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADHJ7UZQAFXAMJHG7GMADODZS5RP5AVCNFSM6AAAAABNAQPR5CVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4DGNJQGU3TSMY. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thanks,
terra::nrow(x) = 1 AND terra::ncol(x) = 2
This function is designed for large problems e.g. grids of 100X100 and larger. I did not write it to handle a grid of just on point which is what nrow is.
You should just use the simpler function sim.spatialProcess.
Douglas Nychka Personal email Cell 3037253199
From: Dan Wismer @.> Date: Monday, August 26, 2024 at 10:53 AM To: dnychka/fieldsRPackage @.> Cc: Douglas Nychka @.>, Comment @.> Subject: Re: [dnychka/fieldsRPackage] fields::circulantEmbeddingSetup question (Issue #6)
Thanks,
terra::nrow(x) = 1 AND terra::ncol(x) = 2
— Reply to this email directly, view it on GitHubhttps://github.com/dnychka/fieldsRPackage/issues/6#issuecomment-2310645731, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADHJ7U6WPHRFOVI64DCQIOLZTNMRFAVCNFSM6AAAAABNAQPR5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJQGY2DKNZTGE. You are receiving this because you commented.Message ID: @.***>
Thanks for your responses dynchka, my data going into the function was the problem as you mentioned. Cheers.
Hi,
I am getting this error
if (any(d < 0)) stop("distance argument must be nonnegative"): missing value where TRUE/FALSE needed
when running the follow function:I am unsure how to debug this one. Wondering if you had any suggestions?
Thanks!