-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Bug]: The filter panel feature does not work well when data/vars have special characters #570
Comments
What are you trying to accomplish here? |
Although there is no practical use of having this column. I created this column to showcase the underlying problem. It is possible to pass data with these columns. We have to handle it. We might simply show a warning when such columns are passed, but we need some way to address this. names(iris)
[1] "Sepal.Length" "Sepal.Width" "Petal.Length"
[4] "Petal.Width" "Species" "Species!"
[7] "Species!@#$%^&*_-+={[()]}:;,<>./?" If you inspect the namespace you'll notice that the namespaces are as follows:
|
No we don't. These are not syntactically valid column names. They wouldn't fly in an interactive session and I see no reason why they should be tolerated in
What about |
|
So full stops are not JS friendly, which is why they are converted to underscores. I don't see why duplicates aren't maintained. I think a simple |
In R it is possible to put garbage names in quotes, e.g. things like: I think that the underlying issue is the fact that this names most likely ends up being a HTML ID string. Just because of that there might be column names validation down the way from user inputs to actuall app HTML creation. I think we saw issues about that already but can't find these now. The ultimate solution would be to replace creating IDs from column names with some hashing functionality that will be (i) unique and (ii) valid string accepted as an ID. I think that any gsub based solution can be challenged once you know the pattern and replacement :) The other aspect is how likely it is. Here I agree with @chlebowa that this probably needs improvement but IMHO it's quite rare. You should not do |
I don't think anything would complain about df$ The fact of the matter is, in R, anything inside `` is a valid identifier according to the language specification. |
What happened?
The namespace creation function for the data and column names can be more robust. Right now the special characters are stripped from the name space which might not be ideal.
sessionInfo()
No response
Relevant log output
No response
Code of Conduct
Contribution Guidelines
Security Policy
The text was updated successfully, but these errors were encountered: