-
Notifications
You must be signed in to change notification settings - Fork 103
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
Improved the R code in parallel coordinates plot dialog #8987
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Vitalis95 that's great - and it seems to work. Just one small point.
# Dialog: Parallel Coordinate Plot
iris <- data_book$get_data_frame(data_name="iris")
column_numbers <- match(c("Sepal.Length","Sepal.Width","Petal.Length","Petal.Width"), names(iris))
last_graph <- GGally::ggparcoord(data=iris, columns=c("Sepal.Length","Sepal.Width","Petal.Length","Petal.Width"),
groupColumn="Species", missing="exclude", order=column_numbers, centerObsID=1) + theme_grey()
data_book$add_object(data_name="iris", object_name="last_graph", object_type_label="graph", object_format="image", object=check_graph(graph_object=last_graph))
data_book$get_object_data(data_name="iris", object_name="last_graph", as_file=TRUE)
rm(list=c("last_graph", "iris", "column_numbers"))
Why not make columns=column_numbers
in the code? There will sometimes be a lot of columns and there is then no need to repeat the names twice?
Then I would like to merge this quickly, so very happy for the other problem to be in a separate pull request.
@rdstern , have a look at it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Vitalis95 that's great. Well done both of us! @N-thony could you check and (I hope) merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Vitalis95 good, just few comments
instat/dlgParallelCoordinatePlot.vb
Outdated
Private Sub ucrReceiverXVariables_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverXVariables.ControlValueChanged | ||
clsMatchFunction.AddParameter("var", ucrReceiverXVariables.GetVariableNames, bIncludeArgumentName:=False, iPosition:=0) | ||
End Sub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
ucrReceiverXVariables.AddAdditionalCodeParameterPair(clsMatchFunction, New RParameter("var", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rdstern over to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving again, so @N-thony can merge
Fixes partially #8985
@rdstern @N-thony , this fixes parallel coordinates plot dialog. I will do the remaining part in a separate PR