create demogdata from demography package in R











up vote
0
down vote

favorite












I am struggling with using demogdata in R demography package.
my code is as below



demogdata("Mx","Exposures",ages = 0:105, years= 1961:2016, "mortality","UK", "Male")


Mx and Exposures are my text files(dataset) which contains death rates and exposures from ages 0:105 and for years 1961:2016. the rows and columns in both are the same. i am getting the following error message



Error in if (nrow(pop) != p | ncol(pop) != n) stop("data and pop are of different size") : argument is of length zero



the other code i tried is as below




demogdata(Mx,Exposures,ages = 0:105, years= 1961:2016, "mortality","UK", "Male")
Blockquote




and get the following error
Error in demogdata(Mx, Exposures, ages = 0:105, years = 1961:2016, "mortality", :
Number of ages doesn't match data



Any help is appreciated.










share|improve this question






















  • Data? Data? Data?
    – 42-
    Nov 12 at 1:04










  • @waqas, please provide a dput() of your data. This will make it easier for us to help you.
    – wl1234
    Nov 12 at 2:49










  • @wl1234 for Mx, V1 V2 V3 V4 V5 1 age 1961.000 1962.000 1963.000 1964.000 2 0 0.025 0.025 0.025 0.023 3 1 0.002 0.001 0.002 0.001 4 2 0.001 0.001 0.001 0.001 5 3 0.001 0.001 0.001 0.001
    – Waqas
    Nov 12 at 11:23










  • @wl1234 for exposures, V1 V2 V3 V4 V5 1 age 1961.0 1962.0 1963.0 1964.0 2 0 402.4 416.9 423.5 430.2 3 1 382.8 401.7 414.5 420.9 4 2 374.5 383.4 401.7 412.7 5 3 366.1 375.9 384.1 401.4
    – Waqas
    Nov 12 at 11:25










  • @waqas, use dput(). We don't want to type everything out to try and help you. stackoverflow.com/questions/5963269/…
    – wl1234
    Nov 12 at 20:03















up vote
0
down vote

favorite












I am struggling with using demogdata in R demography package.
my code is as below



demogdata("Mx","Exposures",ages = 0:105, years= 1961:2016, "mortality","UK", "Male")


Mx and Exposures are my text files(dataset) which contains death rates and exposures from ages 0:105 and for years 1961:2016. the rows and columns in both are the same. i am getting the following error message



Error in if (nrow(pop) != p | ncol(pop) != n) stop("data and pop are of different size") : argument is of length zero



the other code i tried is as below




demogdata(Mx,Exposures,ages = 0:105, years= 1961:2016, "mortality","UK", "Male")
Blockquote




and get the following error
Error in demogdata(Mx, Exposures, ages = 0:105, years = 1961:2016, "mortality", :
Number of ages doesn't match data



Any help is appreciated.










share|improve this question






















  • Data? Data? Data?
    – 42-
    Nov 12 at 1:04










  • @waqas, please provide a dput() of your data. This will make it easier for us to help you.
    – wl1234
    Nov 12 at 2:49










  • @wl1234 for Mx, V1 V2 V3 V4 V5 1 age 1961.000 1962.000 1963.000 1964.000 2 0 0.025 0.025 0.025 0.023 3 1 0.002 0.001 0.002 0.001 4 2 0.001 0.001 0.001 0.001 5 3 0.001 0.001 0.001 0.001
    – Waqas
    Nov 12 at 11:23










  • @wl1234 for exposures, V1 V2 V3 V4 V5 1 age 1961.0 1962.0 1963.0 1964.0 2 0 402.4 416.9 423.5 430.2 3 1 382.8 401.7 414.5 420.9 4 2 374.5 383.4 401.7 412.7 5 3 366.1 375.9 384.1 401.4
    – Waqas
    Nov 12 at 11:25










  • @waqas, use dput(). We don't want to type everything out to try and help you. stackoverflow.com/questions/5963269/…
    – wl1234
    Nov 12 at 20:03













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am struggling with using demogdata in R demography package.
my code is as below



demogdata("Mx","Exposures",ages = 0:105, years= 1961:2016, "mortality","UK", "Male")


Mx and Exposures are my text files(dataset) which contains death rates and exposures from ages 0:105 and for years 1961:2016. the rows and columns in both are the same. i am getting the following error message



Error in if (nrow(pop) != p | ncol(pop) != n) stop("data and pop are of different size") : argument is of length zero



the other code i tried is as below




demogdata(Mx,Exposures,ages = 0:105, years= 1961:2016, "mortality","UK", "Male")
Blockquote




and get the following error
Error in demogdata(Mx, Exposures, ages = 0:105, years = 1961:2016, "mortality", :
Number of ages doesn't match data



Any help is appreciated.










share|improve this question













I am struggling with using demogdata in R demography package.
my code is as below



demogdata("Mx","Exposures",ages = 0:105, years= 1961:2016, "mortality","UK", "Male")


Mx and Exposures are my text files(dataset) which contains death rates and exposures from ages 0:105 and for years 1961:2016. the rows and columns in both are the same. i am getting the following error message



Error in if (nrow(pop) != p | ncol(pop) != n) stop("data and pop are of different size") : argument is of length zero



the other code i tried is as below




demogdata(Mx,Exposures,ages = 0:105, years= 1961:2016, "mortality","UK", "Male")
Blockquote




and get the following error
Error in demogdata(Mx, Exposures, ages = 0:105, years = 1961:2016, "mortality", :
Number of ages doesn't match data



Any help is appreciated.







r






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 11 at 22:07









Waqas

1




1












  • Data? Data? Data?
    – 42-
    Nov 12 at 1:04










  • @waqas, please provide a dput() of your data. This will make it easier for us to help you.
    – wl1234
    Nov 12 at 2:49










  • @wl1234 for Mx, V1 V2 V3 V4 V5 1 age 1961.000 1962.000 1963.000 1964.000 2 0 0.025 0.025 0.025 0.023 3 1 0.002 0.001 0.002 0.001 4 2 0.001 0.001 0.001 0.001 5 3 0.001 0.001 0.001 0.001
    – Waqas
    Nov 12 at 11:23










  • @wl1234 for exposures, V1 V2 V3 V4 V5 1 age 1961.0 1962.0 1963.0 1964.0 2 0 402.4 416.9 423.5 430.2 3 1 382.8 401.7 414.5 420.9 4 2 374.5 383.4 401.7 412.7 5 3 366.1 375.9 384.1 401.4
    – Waqas
    Nov 12 at 11:25










  • @waqas, use dput(). We don't want to type everything out to try and help you. stackoverflow.com/questions/5963269/…
    – wl1234
    Nov 12 at 20:03


















  • Data? Data? Data?
    – 42-
    Nov 12 at 1:04










  • @waqas, please provide a dput() of your data. This will make it easier for us to help you.
    – wl1234
    Nov 12 at 2:49










  • @wl1234 for Mx, V1 V2 V3 V4 V5 1 age 1961.000 1962.000 1963.000 1964.000 2 0 0.025 0.025 0.025 0.023 3 1 0.002 0.001 0.002 0.001 4 2 0.001 0.001 0.001 0.001 5 3 0.001 0.001 0.001 0.001
    – Waqas
    Nov 12 at 11:23










  • @wl1234 for exposures, V1 V2 V3 V4 V5 1 age 1961.0 1962.0 1963.0 1964.0 2 0 402.4 416.9 423.5 430.2 3 1 382.8 401.7 414.5 420.9 4 2 374.5 383.4 401.7 412.7 5 3 366.1 375.9 384.1 401.4
    – Waqas
    Nov 12 at 11:25










  • @waqas, use dput(). We don't want to type everything out to try and help you. stackoverflow.com/questions/5963269/…
    – wl1234
    Nov 12 at 20:03
















Data? Data? Data?
– 42-
Nov 12 at 1:04




Data? Data? Data?
– 42-
Nov 12 at 1:04












@waqas, please provide a dput() of your data. This will make it easier for us to help you.
– wl1234
Nov 12 at 2:49




@waqas, please provide a dput() of your data. This will make it easier for us to help you.
– wl1234
Nov 12 at 2:49












@wl1234 for Mx, V1 V2 V3 V4 V5 1 age 1961.000 1962.000 1963.000 1964.000 2 0 0.025 0.025 0.025 0.023 3 1 0.002 0.001 0.002 0.001 4 2 0.001 0.001 0.001 0.001 5 3 0.001 0.001 0.001 0.001
– Waqas
Nov 12 at 11:23




@wl1234 for Mx, V1 V2 V3 V4 V5 1 age 1961.000 1962.000 1963.000 1964.000 2 0 0.025 0.025 0.025 0.023 3 1 0.002 0.001 0.002 0.001 4 2 0.001 0.001 0.001 0.001 5 3 0.001 0.001 0.001 0.001
– Waqas
Nov 12 at 11:23












@wl1234 for exposures, V1 V2 V3 V4 V5 1 age 1961.0 1962.0 1963.0 1964.0 2 0 402.4 416.9 423.5 430.2 3 1 382.8 401.7 414.5 420.9 4 2 374.5 383.4 401.7 412.7 5 3 366.1 375.9 384.1 401.4
– Waqas
Nov 12 at 11:25




@wl1234 for exposures, V1 V2 V3 V4 V5 1 age 1961.0 1962.0 1963.0 1964.0 2 0 402.4 416.9 423.5 430.2 3 1 382.8 401.7 414.5 420.9 4 2 374.5 383.4 401.7 412.7 5 3 366.1 375.9 384.1 401.4
– Waqas
Nov 12 at 11:25












@waqas, use dput(). We don't want to type everything out to try and help you. stackoverflow.com/questions/5963269/…
– wl1234
Nov 12 at 20:03




@waqas, use dput(). We don't want to type everything out to try and help you. stackoverflow.com/questions/5963269/…
– wl1234
Nov 12 at 20:03

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53253733%2fcreate-demogdata-from-demography-package-in-r%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53253733%2fcreate-demogdata-from-demography-package-in-r%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

鏡平學校

ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

Why https connections are so slow when debugging (stepping over) in Java?