-
Notifications
You must be signed in to change notification settings - Fork 22
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
Unexpected behaviour in frozen_tour() #104
Comments
@nspyrison try out the code again. I fixed one problem that the initialisation wasn't happening correctly if one of the first variables was frozen. |
@dicook, that fixed the first issue! To list the remaining issue and re-hash 2 cases from the example section of require(tourr) ## SHA1 (272a2f88) from 30/05/2021
#> Loading required package: tourr
#install.packages("ellipsis") ## required newer ver
#install.packages("vctrs") ## required newer ver
print("Case 4 remains unexpected success.")
#> [1] "Case 4 remains unexpected success."
## Norm > 1, variable contribution larger than 1; unexpected success
frozen <- matrix(NA, nrow = 4, ncol = 2)
frozen[3, ] <- .9
if(interactive())
animate_xy(flea[, 1:4], frozen_tour(2, frozen))
print("Now working, but sometimes has discrete jumps, step size seem much larger than ussual for 2 consecutive frames, seems undesirable.")
#> [1] "Now working, but sometimes has discrete jumps, step size seem much larger than ussual for 2 consecutive frames, seems undesirable."
# Doesn't work - a bug?
frozen <- matrix(NA, nrow = 4, ncol = 2)
frozen[1:2, 1] <- 1 / 4
if(interactive())
animate_xy(flea[, 1:4], frozen_tour(2, frozen))
print("Less importantly, when norm = 1, error code should suggest use of dependence_tour() to set 1 variable to 1 axis. As pointed out in this example code:")
#> [1] "Less importantly, when norm = 1, error code should suggest use of dependence_tour() to set 1 variable to 1 axis. As pointed out in this example code:"
## Not run:
# This freezes one entire direction which causes a problem,
# and is caught by error handling.
# If you want to do this it would be best with a dependence
# tour, with one variable set one axis, eg 3rd variable to
# x axis would be indicated from the code below
frozen <- matrix(NA, nrow = 4, ncol = 2)
frozen[3, ] <- c(0, 1)
animate_xy(flea[, 1:4], frozen_tour(2, frozen))
#> Converting input data to the required matrix format.
#> Error: Columns of frozen matrix must have squared norm < 1 Created on 2021-05-30 by the reprex package (v2.0.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created on 2021-04-12 by the reprex package (v1.0.0)
The text was updated successfully, but these errors were encountered: