You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using esquisser() and then the GUI for Import and Update, the renaming of the column variables makes the output code not reusable, because the renamed columns do not correspond anymore to the original column names.
Example if I rename Sepal.Length in the iris dataset into Sepal.Lenght2, this is esquisse's output code:
This code cannot work because in the environment the column is still iris$Sepal.Length.
Now, one solution would be to make the esquisse Import function use tidyverse before the ggplot command to do the renaming. Exemple of always working output code:
Of course, the filter commands written by the esquisse Data tab (which already follow the syntax suggested here) should be placed after the rename command. Example:
Yes this is problematic, we need to see how we can generate code in this module.
There some work to be done, I cannot say when I'll get time to look at that.
Hi,
using esquisser() and then the GUI for Import and Update, the renaming of the column variables makes the output code not reusable, because the renamed columns do not correspond anymore to the original column names.
Example if I rename Sepal.Length in the iris dataset into Sepal.Lenght2, this is esquisse's output code:
ggplot(iris) +
aes(x = Sepal.Length2) +
geom_histogram(bins = 30L, fill = "#112446") +
theme_minimal()
This code cannot work because in the environment the column is still iris$Sepal.Length.
Now, one solution would be to make the esquisse Import function use tidyverse before the ggplot command to do the renaming. Exemple of always working output code:
iris %>%
rename(Sepal.Length2 = Sepal.Length) %>%
ggplot() +
aes(x = Sepal.Length2) +
geom_histogram(bins = 30L, fill = "#112446") +
theme_minimal()
Of course, the filter commands written by the esquisse Data tab (which already follow the syntax suggested here) should be placed after the rename command. Example:
iris %>%
rename(Sepal.Length2 = Sepal.Length) %>%
filter(Sepal.Length2 > 1) %>%
ggplot() +
aes(x = Sepal.Length2) +
geom_histogram(bins = 30L, fill = "#112446") +
theme_minimal()
The text was updated successfully, but these errors were encountered: