{"id":2218,"date":"2022-05-05T05:47:23","date_gmt":"2022-05-05T04:47:23","guid":{"rendered":"https:\/\/www.microdata.no\/?p=2218"},"modified":"2022-05-05T05:55:30","modified_gmt":"2022-05-05T04:55:30","slug":"new-functionality-simplified-recoding-of-string-variables","status":"publish","type":"post","link":"https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/","title":{"rendered":"New functionality: simplified recoding of string variables"},"content":{"rendered":"\n<p><strong><em>Recode string variables faster and easier in microdata.no.<\/em><\/strong><\/p>\n\n\n\n<!--more-->\n\n\n\n<p>The <code>recode<\/code> command has been extended with support for recoding variables with alphanumeric values, also known as &#8220;string variables&#8221;. Until now, this command has been limited to numeric variables, and recoding string variables could only be done using repeated <code>replace<\/code>-commands.<\/p>\n\n\n\n<p>It is now possible to express alphanumeric recode rules more efficiently and compact via <code>recode<\/code>. This will typically also reduce execution time for scripts.<\/p>\n\n\n\n<p>The example below demonstrates recoding of a string variable:<\/p>\n\n\n\n<p><code>recode var1 ('1' '2' '3' = '0') ('4' = '1')<\/code><\/p>\n\n\n\n<p>You may also assign user-defined labels to the new values.<\/p>\n\n\n\n<p>Type <code>help recode<\/code> in microdata.no&#8217;s command line tool for a more detailed explanations and more examples on recoding.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recode string variables faster and easier in microdata.no.<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-2218","post","type-post","status-publish","format-standard","hentry","category-news"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>New functionality: simplified recoding of string variables - microdata.no<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New functionality: simplified recoding of string variables - microdata.no\" \/>\n<meta property=\"og:description\" content=\"Recode string variables faster and easier in microdata.no.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/\" \/>\n<meta property=\"og:site_name\" content=\"microdata.no\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-05T04:47:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-05T04:55:30+00:00\" \/>\n<meta name=\"author\" content=\"\u00d8rnulf Risnes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u00d8rnulf Risnes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-functionality-simplified-recoding-of-string-variables\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-functionality-simplified-recoding-of-string-variables\\\/\"},\"author\":{\"name\":\"\u00d8rnulf Risnes\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#\\\/schema\\\/person\\\/0077d421855fe8663fb71c0b5c1a99df\"},\"headline\":\"New functionality: simplified recoding of string variables\",\"datePublished\":\"2022-05-05T04:47:23+00:00\",\"dateModified\":\"2022-05-05T04:55:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-functionality-simplified-recoding-of-string-variables\\\/\"},\"wordCount\":115,\"articleSection\":[\"News\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-functionality-simplified-recoding-of-string-variables\\\/\",\"url\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-functionality-simplified-recoding-of-string-variables\\\/\",\"name\":\"New functionality: simplified recoding of string variables - microdata.no\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#website\"},\"datePublished\":\"2022-05-05T04:47:23+00:00\",\"dateModified\":\"2022-05-05T04:55:30+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#\\\/schema\\\/person\\\/0077d421855fe8663fb71c0b5c1a99df\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-functionality-simplified-recoding-of-string-variables\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-functionality-simplified-recoding-of-string-variables\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-functionality-simplified-recoding-of-string-variables\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Hjem\",\"item\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"New functionality: simplified recoding of string variables\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#website\",\"url\":\"https:\\\/\\\/www.microdata.no\\\/\",\"name\":\"microdata.no\",\"description\":\"Gj\u00f8r det enklere \u00e5 analysere registerdata\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.microdata.no\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#\\\/schema\\\/person\\\/0077d421855fe8663fb71c0b5c1a99df\",\"name\":\"\u00d8rnulf Risnes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e8d8acbbc43a7099fe8ac77a77497924f93b35277750ead1dbb984a8c6b5dc1b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e8d8acbbc43a7099fe8ac77a77497924f93b35277750ead1dbb984a8c6b5dc1b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e8d8acbbc43a7099fe8ac77a77497924f93b35277750ead1dbb984a8c6b5dc1b?s=96&d=mm&r=g\",\"caption\":\"\u00d8rnulf Risnes\"},\"url\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/author\\\/ornulf\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"New functionality: simplified recoding of string variables - microdata.no","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/","og_locale":"en_US","og_type":"article","og_title":"New functionality: simplified recoding of string variables - microdata.no","og_description":"Recode string variables faster and easier in microdata.no.","og_url":"https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/","og_site_name":"microdata.no","article_published_time":"2022-05-05T04:47:23+00:00","article_modified_time":"2022-05-05T04:55:30+00:00","author":"\u00d8rnulf Risnes","twitter_card":"summary_large_image","twitter_misc":{"Written by":"\u00d8rnulf Risnes","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/#article","isPartOf":{"@id":"https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/"},"author":{"name":"\u00d8rnulf Risnes","@id":"https:\/\/www.microdata.no\/#\/schema\/person\/0077d421855fe8663fb71c0b5c1a99df"},"headline":"New functionality: simplified recoding of string variables","datePublished":"2022-05-05T04:47:23+00:00","dateModified":"2022-05-05T04:55:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/"},"wordCount":115,"articleSection":["News"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/","url":"https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/","name":"New functionality: simplified recoding of string variables - microdata.no","isPartOf":{"@id":"https:\/\/www.microdata.no\/#website"},"datePublished":"2022-05-05T04:47:23+00:00","dateModified":"2022-05-05T04:55:30+00:00","author":{"@id":"https:\/\/www.microdata.no\/#\/schema\/person\/0077d421855fe8663fb71c0b5c1a99df"},"breadcrumb":{"@id":"https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.microdata.no\/en\/new-functionality-simplified-recoding-of-string-variables\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Hjem","item":"https:\/\/www.microdata.no\/en\/"},{"@type":"ListItem","position":2,"name":"New functionality: simplified recoding of string variables"}]},{"@type":"WebSite","@id":"https:\/\/www.microdata.no\/#website","url":"https:\/\/www.microdata.no\/","name":"microdata.no","description":"Gj\u00f8r det enklere \u00e5 analysere registerdata","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.microdata.no\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.microdata.no\/#\/schema\/person\/0077d421855fe8663fb71c0b5c1a99df","name":"\u00d8rnulf Risnes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e8d8acbbc43a7099fe8ac77a77497924f93b35277750ead1dbb984a8c6b5dc1b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e8d8acbbc43a7099fe8ac77a77497924f93b35277750ead1dbb984a8c6b5dc1b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e8d8acbbc43a7099fe8ac77a77497924f93b35277750ead1dbb984a8c6b5dc1b?s=96&d=mm&r=g","caption":"\u00d8rnulf Risnes"},"url":"https:\/\/www.microdata.no\/en\/author\/ornulf\/"}]}},"taxonomy_info":{"category":[{"value":2,"label":"News"}]},"featured_image_src_large":false,"author_info":{"display_name":"\u00d8rnulf Risnes","author_link":"https:\/\/www.microdata.no\/en\/author\/ornulf\/"},"comment_info":0,"category_info":[{"term_id":2,"name":"News","slug":"news","term_group":0,"term_taxonomy_id":2,"taxonomy":"category","description":"","parent":0,"count":79,"filter":"raw","cat_ID":2,"category_count":79,"category_description":"","cat_name":"News","category_nicename":"news","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/posts\/2218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/comments?post=2218"}],"version-history":[{"count":4,"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/posts\/2218\/revisions"}],"predecessor-version":[{"id":2226,"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/posts\/2218\/revisions\/2226"}],"wp:attachment":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/media?parent=2218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/categories?post=2218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/tags?post=2218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}