-
Notifications
You must be signed in to change notification settings - Fork 40
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
type.convert turns in certain cases numerics to integer, so that only integers are allowed when editing #48
Comments
I'm facing the same problem. I think this should be corrected since even the factors columns are converted into numeric. |
@ShinyFabio, do you have any examples of the factor conversion issues you are seeing? I am having a look at this and I would like to make changes that will address all issues (if possible). |
I just pushed @aalucaci's suggestion to
In the case of converting characters to factors, the default retains characters:
Using
This factor column looks the same as the one in the original
|
Yes sure, on monday I'll try to send you an example. |
Hello,
thank you for your package, which I started using recently.
I noticed the following problem: data.frames containing numeric columns are converted to integer if the values are not fractional.
A little bit of digging around showed that this is due to the usage of type.convert:
In case of mtcars for example, this means that some columns, although initially of type numeric, are converted to type integer:
As a consequence, for example when the cyl column is edited with DataEditR, only integer values are accepted.
I fixed this locally by replacing the following lines of code from helpers.R:
with
(I apologize, for technical reasons I'm not able to create a pull request.)
Would it be possible for you to consider this workaround, or do you see some possible issues with it?
I also had a look in the list of R bugs, to check if anybody posted something about type.convert. I found this:
https://bugs.r-project.org/show_bug.cgi?id=17979
which describes some questionable conversions of dates, timestamps and tseries. Not sure what the impact is for rhandsontable,
maybe adding a word of caution in the description would help the users.
Kind regards,
Angela
The text was updated successfully, but these errors were encountered: