-
Notifications
You must be signed in to change notification settings - Fork 42
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
as.unit() ought to use a csv driver file, like rename() does #2255
Comments
Actually, there is no need for anchors (the |
Protection is needed for superscripts, e.g. if we use
in the file, it can be decoded with (e.g. after reading the file into > U[which(sapply(U[,1], \(p) grepl(paste0("^",p,"$"),"kg/m^3"))),2]
[1] "kg/m^3"
> U[66,]
V1 V2 V3
66 kg/m\\^3 kg/m^3 |
These are the units (as read from the csv file I'm working on) as of now. I'll think this reproduces what I have hard-wired at the moment, but I have not checked yet. My next step will be to give
|
Doing that will simplify the code, and also make it a lot easier for users to extend the capabilities of
as.unit()
.This is in-line with the way
rename()
works, and how (frankly) things ought to have worked for a long time. I think this can be done without causing problems, but I'll do it in a new branch (named "as_unit") to avoid any problems, since I expect I'll be adding quite a few units, to handle the data that I lately download from IOOS servers.The text was updated successfully, but these errors were encountered: