-
Notifications
You must be signed in to change notification settings - Fork 14
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
cannot remove site level attr with SPC$x <- NULL #163
Comments
So, a primary problem here was that The next problem pertained to the serial dispatch of |
Thanks for the fixes. I've noticed something new in The profile IDs are shuffled in the top figure, associated with I suspect making New test case. library(aqp)
library(cluster)
library(sharpshootR)
data(sp4)
depths(sp4) <- id ~ top + bottom
# profile to general realizations of
p.idx <- 1
# spike profile
spike.idx <- 6
# now safely removes id from horizons, thanks @brownag
# simulate some data
horizons(sp4)$bdy <- 4
p <- permute_profile(sp4[p.idx, ], n=10, boundary.attr = 'bdy', min.thickness = 2)
# this works now, thanks @brownag
# remove from @site
site(p)$id <- NULL
## Whoa! What?
## IDs shuffled
# this is wrong
z.1 <- union(list(sp4[c(p.idx, spike.idx), ], p))
# this is right
z.2 <- union(list(p, sp4[c(p.idx, spike.idx), ]))
# top version has IDs shuffled, likely bug in union
par(mar=c(0,0,3,0), mfrow=c(2,1))
plotSPC(z.1, color = 'K')
plotSPC(z.2, color = 'K')
## check out the version that worked
dev.off()
d <- profile_compare(z.2, vars = c('K', 'sand', 'CEC_7'), max_d = 40, k = 0)
dd <- diana(d)
plotProfileDendrogram(z.2, dd, scaling.factor = 1.5, y.offset = 5, width = 0.3, color = 'K') |
Thanks for catching that. This is actually related to the changes I just made to Trying your test case after e64aad7 I obtain I suspected there would be some non-target impacts -- I used your case to make tests to cover this. The degenerate case where |
I originally made the above fix within |
Thanks! |
The text was updated successfully, but these errors were encountered: