readHMD
, you must first obtain a
username
and password
from HMD and supply them as
arguments to this function.readHMD(username, password,
country=c(AUS='Australia', AUT='Austria', BLR='Belarus',
BEL='Belgium', BGR='Bulgaria', CAN='Canada',
CHL='Chile', CZE='Czech Republic', DNK='Denmark',
EST='Estonia', FIN='Finland', FRA='France',
DEU='Germany', HUN='Hungary', ISL='Iceland',
IRL='Ireland', ISR='Israel', ITA='Italy',
JPN='Japan', LVA='Latvia', LTU='Lithuania',
LUX='Luxemburg', NDL='Netherlands', NZL='New Zealand',
NOR='Norway', POL='Poland', PRT='Portugal',
RUS='Russia', SVK='Slovakia', SVN='Slovenia',
ESP='Spain', SWE='Sweden', CHE='Switzerland',
TWN='Taiwan', GBR='U.K.', USA='U.S.A.',
UKR='Ukraine'),
sex=c('m', 'f', 'b'), HMDurl='http://www.mortality.org/hmd',
dataType = 'lt',
ltCol=c('m', 'q', 'a', 'l', 'd', 'L', 'T', 'e'),
cohper = c(coh='cohort', per='periodic'),
ageInterval=c(1, 5), yearInterval=c(1, 5, 10),
url, ...)
url
argument.read.table
fails, this returns a list with the following components:url
if provided or
the url that was constructed after noting that it was missing.getURL
.getURL
getURL
hmd.mx
user <- "your.email@wherever.org" # as registered with HMD.
pw <- "1234567890"
# password as provided in an email from HMD possibly changed by you.
country <- 'Sweden'
SwedeMatAll <- readHMD(user, pw, 'Sweden', sex='f')
Run the code above in your browser using DataLab