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

adapt plotSPC to safely deal with and sketch horizon-less SPC members #138

Closed
dylanbeaudette opened this issue May 28, 2020 · 1 comment
Closed

Comments

@dylanbeaudette
Copy link
Member

dylanbeaudette commented May 28, 2020

Examples needed, perhaps in a new example dataset.

@dylanbeaudette
Copy link
Member Author

Seems to work:

library(aqp)

x <- lapply(letters[1:10], random_profile, SPC = FALSE, n_prop = 1)
x <- do.call('rbind', x)

# add an 11th profile, with 1 "slice" that has NA depths
x <- rbind(x, data.frame(id = letters[11], top = NA, bottom = NA, name =NA, p1 = NA))

# promotion to SPC works
depths(x) <- id ~ top + bottom

# plot works
par(mar = c(1, 1, 3, 2))
plotSPC(x, color = 'p1', name = 'name')

# errors as expected
d <- dice(x)

# works
d <- dice(x, fm = 0:50 ~ ., byhz = FALSE)

# note that profile 'k' has been dropped
plotSPC(d, color = 'p1', lwd = 0.5)

This issue was closed.
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

1 participant