Closed nanxstats closed 4 months ago
@yihui in case you got a minute to review
First, I'd prefer using a
matrix
to write the data, which is a little more compact than the data frame.Second, I wonder if it's worth the effort to make the file
R/unicode_latex.R
human-readable. If not, we could consider justdump()
the data frame inupdate_unicode_latex()
.I don't have a strong opinion on either point. It's fine to merge the current PR as is.
Great! Thanks. I've applied the changes and updated the table. The matrix version is exactly what we need to be less tedious. How I hoped there could be a row-wise data frame constructor in base. 😂
Making it human-readable seems to be manageable in this case, so let's just keep it that way.
Fixes #218
This PR creates an internal function in
R/utils.R
to generate the mapping table intoR/unicode_latex.R
.This eliminates the need for using the binary file
sysdata.rda
and is more friendly for version control.The new, code-generated data frame is bitwise identical to the version saved in
sysdata.rda
, except that theint
column is of class integer, not numeric.Data ingestion issue worth following up
You might want to check the data ingestion logic. I found no evidence on how the previous version was constructed. I used some ad hoc logic to get an identical version of the table, but it would be good to check if the data included in the previous version is reasonable, or what specific filters were applied. For example, from the beginning, without using
quote = ""
inread.table()
, it will give:This will result in only 1740 rows vs. 2757 rows when using
quote = ""
, which avoids the warning.