[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-734083-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-734083-en":130,"doc-similar-734083":162},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","countries-deal-with-country-data-in-an-easy-way-version-125","countries - Deal with Country Data in an Easy Way - Version 1.2.5","","countries is an R package for wrangling country data effectively and quickly. It provides functions to identify and convert country names, download country information, merge datasets from different sources, and generate quick world maps. It supports handling different naming conventions (e.g., Italy vs ITA) and multiple date formats. The included utilities automate pivoting wide tables to long format and assist in detecting country and year columns for analysis-ready data.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/countries-deal-with-country-data-in-an-easy-way-version-125/734083/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/countries-deal-with-country-data-in-an-easy-way-version-125/734083.png","ImageObject",300,407,{"name":42,"@type":43},"Sarah ","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-29","2026-11-22",true,{"@type":52,"interactionType":53,"userInteractionCount":30},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What does the countries R package help you do with country data?","Question",{"text":62,"@type":63},"It identifies and converts country names, downloads country information, merges country datasets from different sources, and supports quick world map creation.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"How does auto_melt transform data?",{"text":67,"@type":63},"When it finds at least three country names or years in column names, it pivots the table from wide to long format, equivalent to tidyr::pivot_longer or data.table::melt on the selected columns.",{"name":69,"@type":60,"acceptedAnswer":70},"What makes auto_merge useful for merging country datasets?",{"text":71,"@type":63},"It can merge multiple tables at once, automatically detect merge columns, and handle different country naming conventions and date formats across datasets.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},734083,1795389792,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,105,110,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":102,"show_sort_weight":103,"slug":104},6,"Technology",50,"technology",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":112,"slug":113},8,30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":111,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":30,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":79,"read_time":144,"preview_page_count":33,"preview_urls":145},962085320529,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","Package ‘countries’  \nOctober 11, 2026  \nType Package  \nTitle Deal with Country Data in an Easy Way Version 1.2.5  \nDescription Wrangle country data more effectively and quickly.  \nThis package contains functions to easily identify and convert country names, download country information, merge country data from different sources, and make quick world maps.  \nLicense GPL-3 Encoding UTF-8  \nImports stringdist, tidyr, stringr, dplyr, knitr, fastmatch, lubridate, utils, methods, stats, httr, jsonlite, ggplot2, viridis, grDevices  \nSuggests data.table, rmarkdown, testthat, curl, rlang Depends R (>= 3.5)  \nVignetteBuilder knitr  \nURL [https://fbellelli.github.io/countries/](https://fbellelli.github.io/countries/),  \n[https://github.com/fbellelli/countries](https://github.com/fbellelli/countries)  \nBugReports [https://github.com/fbellelli/countries/issues](https://github.com/fbellelli/countries/issues)  \nConfig/testthat/edition 3 LazyData true  \nConfig/roxygen2/version 8.0.0 NeedsCompilation no  \nAuthor Francesco Saverio Bellelli [aut, cre, cph](Website:  \n[https://fbellelli.com/](https://fbellelli.com/))  \nMaintainer Francesco Saverio Bellelli \u003C[fsabellelli@gmail.com](fsabellelli@gmail.com)> Repository CRAN  \nDate/Publication 2026-10-11 14:40:07 UTC  \nContents  \nauto_melt .......................................... 2  \nauto_merge ......................................... 4  \ncheck_countries_api .................................... 6  \ncheck_wide_format ..................................... 7  \ncountry_info ......................................... 7  \ncountry_name ........................................ 9  \ncountry_reference_list ................................... 10  \ncountry_reference_list_long ................................ 13  \nfind_countrycol ....................................... 13  \nfind_keycol ......................................... 14  \nfind_timecol ......................................... 16  \nis_country .......................................... 17  \nis_date ............................................ 18  \nis_keycol .......................................... 19  \nlist_countries ........................................ 20  \nlist_fields .......................................... 20  \nmatch_table ......................................... 21  \nMode ............................................ 22  \npalettes_countries ...................................... 23  \nquick_map .......................................... 24  \nrandom_countries ...................................... 26  \nwhich_min ......................................... 27  \nworld ............................................ 28  \nIndex 29  \n\n| auto_melt | Automatic pivoting of country and year columns to a long format |\n| --- | --- |\n\nDescription  \nWhen at least 3 country names or years are found in the column names, the function will automatically transform the table from a wide to a long format by pivoting the country/year columns. This is equivalent to applying tidyr::pivot_longer() or data.table::melt() on the columns with years or countries as names. The function is able to detect years also when they are preceded by a prefix.  \nUsage  \nauto_melt(  \nx,  \nnames_to = \"pivoted_colnames\",  \nvalues_to = \"pivoted_data\",  \nverbose = TRUE,  \npivoting_info = FALSE)  \nauto_melt 3  \nArguments  \nx A data.frame object to check and pivot country or year columns.  \nnames_to String indicating how the column holding the name of the pivoted columns  \nshould be called in the output table. Default is \"pivoted_colnames\"  \nvalues_to String indicating how the column containing the values of the pivoted columns  \nshould be called in the output table. Default is \"pivoted_data\"  \nverbose Logical value. If set to TRUE (the default), a message will be displayed on the console indicating which columns are being pivoted. If set to FALSE, the messages are turned off.  \npivoting_info Logical value indicating whether to return the list of names of the column that have been pivoted. Defau","cbCaifTIiJek2Xe8","https://ap.wps.com/l/cbCaifTIiJek2Xe8","pdf",158431,29,"English","# auto_melt\n## Usage\n# auto_merge\n## Usage","[{\"question\":\"What does the countries R package help you do with country data?\",\"answer\":\"It identifies and converts country names, downloads country information, merges country datasets from different sources, and supports quick world map creation.\"},{\"question\":\"How does auto_melt transform data?\",\"answer\":\"When it finds at least three country names or years in column names, it pivots the table from wide to long format, equivalent to tidyr::pivot_longer or data.table::melt on the selected columns.\"},{\"question\":\"What makes auto_merge useful for merging country datasets?\",\"answer\":\"It can merge multiple tables at once, automatically detect merge columns, and handle different country naming conventions and date formats across datasets.\"}]","countries - Deal with Country Data in an Easy Way - Version 1.2.5 | PDF",73,[146,150,154,158],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/aa2c15f6f43036b5cc663b4c9093a9d9.webp",983,1272,{"page_no":26,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/28c89fcb5afc3e48a861e3b554ebea12.webp",982,1270,{"page_no":30,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/1c789f021ac953b605f8dbf1c925155a.webp",981,1269,{"page_no":33,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/6c057e9631b663b1ddd09b4f9d39f36a.webp",980,1268,{"list":163,"token":11},[164,171,178,185,191,197,203,209,215,221],{"doc_id":165,"doc_title":166,"file_type":137,"home_preview_img_url":167,"slug":168,"view_count":169,"category_name":29,"create_tm":170},322520,"Ordinarily Resident - CHRA Europe Region-Employment","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229908310365/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796203259&Signature=nlwLTlbPl4E9KmbxhZJc4uSG%2BZM%3D","ordinarily-resident-chra-europe-region-employment",14,1789962929,{"doc_id":172,"doc_title":173,"file_type":137,"home_preview_img_url":174,"slug":175,"view_count":176,"category_name":29,"create_tm":177},85127,"The Individual Targeting Assumption: A Systematic Review of Proactive Robots in Human Group Settings","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809291526/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796203259&Signature=fd2FKsvTcNirOCrDg%2B9pnXyzXGE%3D","the-individual-targeting-assumption-a-systematic-review-of-proactive-robots-in-human-group-settings",22,1784201271,{"doc_id":179,"doc_title":180,"file_type":137,"home_preview_img_url":181,"slug":182,"view_count":183,"category_name":29,"create_tm":184},322544,"Ordinarily Resident","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229908311115/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796203259&Signature=5tVfkWfXlvbWPKCIbaEsufxCgVI%3D","ordinarily-resident",12,1789962993,{"doc_id":186,"doc_title":187,"file_type":137,"home_preview_img_url":188,"slug":189,"view_count":115,"category_name":29,"create_tm":190},537471,"Country Codes - Object rules if applicable","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229943926555/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796203259&Signature=%2FUcsbA5xGYrv%2Fr5tipkVBot%2BIjw%3D","country-codes-object-rules-if-applicable",1791604774,{"doc_id":192,"doc_title":193,"file_type":137,"home_preview_img_url":194,"slug":195,"view_count":33,"category_name":29,"create_tm":196},732234,"Portcodes-2020 - List of Country Codes and Port Codes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031767529/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796203259&Signature=QXFd%2FoB5mhxBGmJbK7rFQSWm24w%3D","portcodes-2020-list-of-country-codes-and-port-codes",1795379108,{"doc_id":198,"doc_title":199,"file_type":137,"home_preview_img_url":200,"slug":201,"view_count":30,"category_name":29,"create_tm":202},734082,"National Statistics Country Classification (NSCC) - Explanatory Notes and Coding Guidelines","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031818882/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796203259&Signature=ZdL30rmMluC4IvrPGF22zk0UnM8%3D","national-statistics-country-classification-nscc-explanatory-notes-and-coding-guidelines",1795389791,{"doc_id":204,"doc_title":205,"file_type":137,"home_preview_img_url":206,"slug":207,"view_count":183,"category_name":29,"create_tm":208},124990,"An Investigation into the Performances of the State-of-the-art Machine Learning Approaches for Various Cyber-attack Detection - A Survey","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229838493016/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796203259&Signature=GMfvjyRDq71RkfMFDXbDcTzNrwg%3D","an-investigation-into-the-performances-of-the-state-of-the-art-machine-learning-approaches-for-various-cyber-attack-detection-a-survey",1785895890,{"doc_id":210,"doc_title":211,"file_type":137,"home_preview_img_url":212,"slug":213,"view_count":26,"category_name":29,"create_tm":214},734104,"CODES FOR THE NAMES OF COUNTRIES - A Reference for ISO 3166 Country Codes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031820040/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796203259&Signature=ACO7bSqP5V7ioPgO%2BH3OeHKMN80%3D","codes-for-the-names-of-countries-a-reference-for-iso-3166-country-codes",1795389891,{"doc_id":216,"doc_title":217,"file_type":137,"home_preview_img_url":218,"slug":219,"view_count":26,"category_name":29,"create_tm":220},761481,"Salary Guide Semiconductor - 2024/25","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230045587192/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796203259&Signature=2vP1uovu33q2C4W46RGZvNn3zw0%3D","salary-guide-semiconductor-202425",1795985559,{"doc_id":222,"doc_title":223,"file_type":137,"home_preview_img_url":224,"slug":225,"view_count":226,"category_name":29,"create_tm":227},120667,"Age, Wealth, and the MPC in Europe - A Supervised Machine Learning Approach","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229835356049/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796203259&Signature=Pft5L3RuUtum7cV0NBcAzWAsMxE%3D","age-wealth-and-the-mpc-in-europe-a-supervised-machine-learning-approach",18,1785731255]