File: cf.R

package info (click to toggle)
r-cran-units 0.8-1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,068 kB
  • sloc: xml: 2,437; cpp: 175; sh: 13; makefile: 2
file content (10 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
library(rvest)
r = read_html(
 "http://cfconventions.org/Data/cf-standard-names/34/build/cf-standard-name-table.html")
tb = html_table(r, fill = TRUE)
library(units)
cf_units = tb[[3]][2][[1]]
u = lapply(cf_units, as_units, force_single_symbol=TRUE, check_is_valid=FALSE)
names(u) = substr(tb[[3]][1][[1]], 1, 50)
# does udunits2 understand them?
all(sapply(u, units::ud_is_parseable))