{"id":9574,"date":"2021-10-14T18:38:52","date_gmt":"2021-10-14T18:38:52","guid":{"rendered":"https:\/\/m-path.io\/manual\/?post_type=ht_kb&#038;p=9574"},"modified":"2026-05-13T15:32:37","modified_gmt":"2026-05-13T15:32:37","slug":"computation-item-r","status":"publish","type":"ht_kb","link":"https:\/\/app-manual-wp-001-atfsdabuggg7fzdq.germanywestcentral-01.azurewebsites.net\/knowledge-base\/computation-item-r\/","title":{"rendered":"Computation item (pseudo R)"},"content":{"rendered":"\n<p>In a Computation item, a mathematical computation is executed on the phone of the client, based on the client&#8217;s previous answers. This computation item or computation is not a real question as the script will just run on the phone of the participant\/client without him\/her noticing. The result of the computation item has the same functionalities as any other answer from a participant. <\/p>\n\n\n\n<p>These computations happen in <strong>real-time<\/strong>. No connection to the internet is necessary. Computation items give the possibility to make <strong>adaptive <\/strong>questionnaires.<\/p>\n\n\n\n<p>Specifically, computation items can be used to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Compute a sum score or average score of a questionnaire.<\/li>\n\n\n\n<li>Use advanced conditional logic.<\/li>\n\n\n\n<li>Compute new constructs that result from the client&#8217;s previous answers.<\/li>\n\n\n\n<li>Randomize questions.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"428\" height=\"90\" src=\"\/wp-content\/uploads\/2021\/10\/compu8.png\" alt=\"\" class=\"wp-image-9742\" srcset=\"\/wp-content\/uploads\/2021\/10\/compu8.png 428w, \/wp-content\/uploads\/2021\/10\/compu8-300x63.png 300w, \/wp-content\/uploads\/2021\/10\/compu8-50x11.png 50w, \/wp-content\/uploads\/2021\/10\/compu8-60x13.png 60w, \/wp-content\/uploads\/2021\/10\/compu8-100x21.png 100w\" sizes=\"auto, (max-width: 428px) 100vw, 428px\" \/><figcaption class=\"wp-element-caption\">dashboard-5 or higher should be used<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">Pseudo R<\/h2>\n\n\n\n<p>The scripting language used to write computations is based on R. Therefore it&#8217;s called Pseudo R. R was chosen as this is probably the language most psychologists or even statisticians are familiar with. The goal is to implement as many functionalities from R to make real-time computations in m-Path as useful as possible.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon\">Let us know (<a href=\"mailto:contact@m-path.io\">contact@m-path.io<\/a>) if you are still missing some functionalities. We are happy to implement them. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example questionnaire &#8216;computation examples&#8217;<\/h2>\n\n\n\n<p>Most computations in this article can be tested by using the &#8216;<strong>computation examples R<\/strong>&#8216; questionnaire from Freud which can be found in the m-Path questionnaire library. This questionnaire starts with two questions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>How happy are you now? (label &#8216;happy&#8217;)<\/li>\n\n\n\n<li>How sad are you now? (label &#8216;sad&#8217;)<\/li>\n<\/ul>\n\n\n\n<p>In the last question, all answers from all computation questions are shown using <a href=\"\/knowledge-base\/piping-from-a-previous-question\/\">piped text<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to create a computation item?<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Choose the Computation question type.<\/li>\n\n\n\n<li>Choose the label of the computation, for example &#8216;happyPlus50&#8217;.<\/li>\n\n\n\n<li>Make sure to set &#8216;<strong>code script<\/strong>&#8216; in <em>pseudo R<\/em>. If you are not able to set the script to pseudo R, you are still working with an older dashboard. The old computation item is <a href=\"\/knowledge-base\/computation-question\/\">explained here<\/a>.<\/li>\n\n\n\n<li>Type the <em>Mathematical expression<\/em>, for example <em>happy+50<\/em>. The value of &#8216;happyPlus50&#8217; will then be set to 50 plus the answer of the question with label &#8216;happy&#8217;.<\/li>\n\n\n\n<li>[optional] Fill in the <em>minimum<\/em> and <em>maximum value for visualization<\/em>. If this computation question needs to be visualized in a plot, m-Path needs to know its minimum and maximum values. As the minimum and maximum value of the &#8216;How happy are you now?&#8217; question are 0 and 100, the minimum and maximum value of happyPlus50 are 50 and 150.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"830\" height=\"592\" src=\"\/wp-content\/uploads\/2021\/10\/compu1-1.png\" alt=\"\" class=\"wp-image-9589\" srcset=\"\/wp-content\/uploads\/2021\/10\/compu1-1.png 830w, \/wp-content\/uploads\/2021\/10\/compu1-1-300x214.png 300w, \/wp-content\/uploads\/2021\/10\/compu1-1-768x548.png 768w, \/wp-content\/uploads\/2021\/10\/compu1-1-50x36.png 50w, \/wp-content\/uploads\/2021\/10\/compu1-1-60x43.png 60w, \/wp-content\/uploads\/2021\/10\/compu1-1-100x71.png 100w\" sizes=\"auto, (max-width: 830px) 100vw, 830px\" \/><figcaption class=\"wp-element-caption\">A simple computation question in the &#8216;computation examples&#8217; questionnaire.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Possible mathematical expressions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Normal mathematical expressions<\/h3>\n\n\n\n<p>A normal mathematical expression is an expression such as <em>5+3*2 +4\/2<\/em>. This will give 13 as a result (see question with label normalMathExpression_1 in example). An absolute value is also possible. For example <em>(-5)^2<\/em> will result in 25 (see questions with label &#8216;normalMathExpression_2&#8217;).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Use answers from previous questions<\/h3>\n\n\n\n<p>Answers from previous questions (from the same questionnaire) can also be used in mathematical expressions. To access these answers, the label of the previous questions can be used in the expression. For example <em> happy-sad<\/em> can be used to subtract &#8216;sad&#8217; from &#8216;happy&#8217; to get some general affect (see label question with label &#8216;happyMinusSad&#8217; in example)<em>.<\/em><\/p>\n\n\n\n<p>Labels from previous computation questions can also be used (E.g.<em> happy+happyPlus50<\/em> in question with label &#8216;happyPlus50Re-use&#8217;).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"829\" height=\"226\" src=\"\/wp-content\/uploads\/2021\/10\/compu3.png\" alt=\"\" class=\"wp-image-9592\" srcset=\"\/wp-content\/uploads\/2021\/10\/compu3.png 829w, \/wp-content\/uploads\/2021\/10\/compu3-300x82.png 300w, \/wp-content\/uploads\/2021\/10\/compu3-768x209.png 768w, \/wp-content\/uploads\/2021\/10\/compu3-50x14.png 50w, \/wp-content\/uploads\/2021\/10\/compu3-60x16.png 60w, \/wp-content\/uploads\/2021\/10\/compu3-100x27.png 100w\" sizes=\"auto, (max-width: 829px) 100vw, 829px\" \/><figcaption class=\"wp-element-caption\">How to <em>use answers from previous questions<\/em>.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-danger\">Make sure all questions needed for the expression are answered, otherwise the answers can not be found and the app will crash.<br><br><em>E.g. If the &#8216;happy&#8217; question is only answered in some conditions, [happy] should not be used in computation questions outside this condition.<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Scripts or multiline mathematical expressions<\/h3>\n\n\n\n<p>Like in R, it is also possible to create expressions that span over multiple lines (so-called scripts). In each line a new variable can be declared. Declaring a variable can be done using the <em>= <\/em>or the <em>&lt;-<\/em> sign. In the following script (found in question with label &#8216;scriptExample&#8217;) three new variables will be set:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>scriptComputation1&lt;-100\nscriptComputation2=happy*4\nscriptComputation3=scriptComputation2-100<\/code><\/pre>\n\n\n\n<p>This script will result in 3 answers (with labels &#8216;scriptComputation1&#8217;, &#8216;scriptComputation2&#8217; and &#8216;scriptComputation3&#8217;). All of them can be used in later questions. <\/p>\n\n\n\n<p>Note that  &#8216;scriptExample&#8217; is the label of the question, but the variable itself is not set. There will only be an answer with label &#8216;scriptExample&#8217; if<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>There is an ans expression. This is an expression where NO new variable is explicitly set, like <em>5*happy<\/em> (but not <em>newVariable = 5*happy<\/em>). The answer of the overall label of the question will be set to the last ans expression.<\/li>\n\n\n\n<li>A variable is set with label &#8216;scriptExample&#8217;. For example <em>scriptExample=70<\/em>.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"823\" height=\"375\" src=\"\/wp-content\/uploads\/2021\/10\/compu4.png\" alt=\"\" class=\"wp-image-9595\" srcset=\"\/wp-content\/uploads\/2021\/10\/compu4.png 823w, \/wp-content\/uploads\/2021\/10\/compu4-300x137.png 300w, \/wp-content\/uploads\/2021\/10\/compu4-768x350.png 768w, \/wp-content\/uploads\/2021\/10\/compu4-50x23.png 50w, \/wp-content\/uploads\/2021\/10\/compu4-60x27.png 60w, \/wp-content\/uploads\/2021\/10\/compu4-100x46.png 100w\" sizes=\"auto, (max-width: 823px) 100vw, 823px\" \/><figcaption class=\"wp-element-caption\">A script of multiple expressions<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Comments in script<\/h3>\n\n\n\n<p>It is also possible to add comments in the script. Everything after <em>#<\/em> will be ignored.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># this statement will be ignored in the script <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Vectors or arrays<\/h3>\n\n\n\n<p>It is possible to create an array using the <em>c()<\/em> command. The following script will create a new array and subsequently add a number to it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>arrayExample=c(1,2,3,4)\narrayExample=c(arrayExample,5) <\/code><\/pre>\n\n\n\n<p>You can subsequently access an array using []<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>secondElement=arrayExample&#91;2]\nsecAndThirdElement=arrayExample&#91;c(2,3)]\n#or with an id vector\nid=c(2,3)\nsecAndThirdElement=arrayExample&#91;id]<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Strings<\/h3>\n\n\n\n<p>You can define strings using single or double quotations marks.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>text1 = 'Text1'\ntext2 = \"Text2\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Using functions<\/h3>\n\n\n\n<p>Many functions from R can already be used in m-Path. Only the base functions can however be used, additional settings can not be included. For example <em>mean(c(1,2,3))<\/em> <em> <\/em>is possible but <em>mean(c(1,2,3),trim=0.1)<\/em> is not. <\/p>\n\n\n\n<p>Additionally, also some functions that are not in R are included. For example, the <em>reverse <\/em>function reverses the score, based on the scale of the variable. This can be very useful when creating a construct that includes reverse scores. <\/p>\n\n\n\n<p>All functions are shown in the example questionnaire in the question with label &#8216;allFunctions&#8217;.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>mean(c(happy,sad))<\/code>: the mean of &#8216;happy&#8217; and &#8216;sad&#8217;.<\/li>\n\n\n\n<li><code>median(c(happy,sad))<\/code>: the median of &#8216;happy&#8217; and &#8216;sad&#8217;.<\/li>\n\n\n\n<li><code>nanmean(c(happy,sad,other))<\/code>: the mean of &#8216;happy&#8217;, &#8216;sad&#8217; and &#8216;other&#8217;. Exclude elements that do not exist or are na (which is the case for &#8216;other&#8217; in the example). At least a single element has to exist for this function to work. This function is equivalent to <code>mean(c(happy,sad,other), na.rm=TRUE)<\/code> in R.<\/li>\n\n\n\n<li><code>max(c(happy,sad))<\/code>: the maximum of &#8216;happy&#8217; and &#8216;sad&#8217;.<\/li>\n\n\n\n<li><code>min(c(happy,sad))<\/code>: the the minimum of &#8216;happy&#8217; and &#8216;sad&#8217;.<\/li>\n\n\n\n<li><code>sum(c(happy,sad))<\/code><em>:<\/em> for the sum of &#8216;happy&#8217; and &#8216;sad&#8217;.<\/li>\n\n\n\n<li><code>sqrt(happy)<\/code>: the square root of &#8216;happy&#8217;<\/li>\n\n\n\n<li><code>log(happy)<\/code>: the log of &#8216;happy&#8217;<\/li>\n\n\n\n<li><code>abs(happy)<\/code>: the absolute value of &#8216;happy&#8217;<\/li>\n\n\n\n<li><code>ceil(happy)<\/code>: the value of &#8216;happy&#8217; ceiled<\/li>\n\n\n\n<li><code>floor(happy)<\/code>: the value of &#8216;happy&#8217; floor<\/li>\n\n\n\n<li><code>round(happy)<\/code>: the value of &#8216;happy&#8217; rounded<\/li>\n\n\n\n<li><code>quantile(c(happy,sad),0.5)<\/code>: the 50% percentile of the array.<\/li>\n\n\n\n<li><code>length(c(happy,sad))<\/code>: the length of the array<\/li>\n\n\n\n<li><code>rnorm(3)<\/code>: creates an array of 3 random variables (normally distributed)<\/li>\n\n\n\n<li><code>runif(3)<\/code>: creates an array of 3 random variables (uniformly distributed)<\/li>\n\n\n\n<li><code>is.na(happy)<\/code>: returns 1 if happy is not available and 0 if it exists<\/li>\n\n\n\n<li><code>reverse(happy)<\/code>: reverses the score of happy. In this case, as happy is on a scale from 0 to 100 it will result in 100-happy. If it would have been a seven point likert scale, it would have resulted in 7-happy+1 (such that the reverse score goes from 7 to 1).<\/li>\n\n\n\n<li><code>as.character(happy)<\/code>: converts a number to a string.<\/li>\n\n\n\n<li><code>nchar('test')<\/code>: counts the characters in a string. This example will return 4.<\/li>\n\n\n\n<li><code>paste('test','1')<\/code>: this will paste two strings together. This example will result in &#8216;test1&#8217;.<\/li>\n\n\n\n<li><code>substr('test5',2,3)<\/code>: this will generate a substring. This example will result in &#8216;es&#8217;.<\/li>\n\n\n\n<li><code>tolower('Test')<\/code>: transforms a string to lower case. In this case the result would be &#8216;test&#8217;.<\/li>\n\n\n\n<li><code>grepl('pattern','string that contains pattern')<\/code>: checks if a string contains a pattern. In this case the output would be 1 (true).<\/li>\n\n\n\n<li><code>as.Date(time)<\/code>: this will format a time (seconds since epoch) into a date format. It outputs a string in format &#8216;year-month-day&#8217;. It will also transform UTC time to current time. Use <em>as.Date(Sys.time)<\/em> for the current date.<\/li>\n\n\n\n<li><code>as.weekday(time)<\/code>: this will return what day of the week this timestamp indicates in an integer value (with Monday being 1 and Sunday being 7).<\/li>\n\n\n\n<li><code>as.day(time)<\/code>: this will return what day of the month this timestamp indicates in an integer value.<\/li>\n\n\n\n<li><code>as.hours(time)<\/code>: this will format a time (seconds since epoch) into the hours of a day. It will also transform UTC time to current time. Use <em>as.hours(Sys.time)<\/em> for the current hours of the day. Also see example 8.<\/li>\n\n\n\n<li><code>as.minutes(time)<\/code>: this will format a time (seconds since epoch) into the minutes of a day. It will also transform UTC time to current time. Use <em>as.minutes(Sys.time)<\/em> for the current minutes of the day. Also see example 8.<\/li>\n\n\n\n<li><code>as.seconds(time)<\/code>: this will format a time (seconds since epoch) into the seconds of a day. It will also transform UTC time to current time. Use <em>as.seconds(Sys.time)<\/em> for the current seconds of the day. Also see example 8.<\/li>\n\n\n\n<li id=\"asepochtime\"><code>as.epochTime(<\/code>&#8220;<code>time<\/code>&#8220;<code>)<\/code>: This will calculate the corresponding time (seconds since epoch) into an integer value. Example: as.epochTime(&#8220;9:00&#8221;) will return the seconds since epoch value for the <strong>last time<\/strong> it was 9:00.<\/li>\n\n\n\n<li><code>is.skipped(happy)<\/code>: returns 1 (true) if question with label <em>happy <\/em>was skipped. This is useful for questions that <a href=\"\/knowledge-base\/questions-general-settings\/#5-allow-skip\">can be skipped<\/a>. See &#8217;empty answer test&#8217; questionnaire for examples.<\/li>\n\n\n\n<li><code>is.timedout(happy)<\/code>: returns 1 (true) if question with label <em>happy <\/em>was timed out. This is useful for questions <a href=\"\/knowledge-base\/questions-general-settings\/#6-has-deadline\">with a deadline<\/a>. See &#8217;empty answer test&#8217; questionnaire for examples.<\/li>\n\n\n\n<li><code>is.empty(happy)<\/code>: returns 1 (true) if question with label <em>happy <\/em>was empty. If a question was not yet filled in and did not have a valid starting value when it was skipped or timed out, the answer is empty. See &#8217;empty answer test&#8217; questionnaire for examples.<\/li>\n\n\n\n<li><code>match(a, b)<\/code>: returns a vector of the positions of (first) matches of its first argument in its second. For example <em>match(3,c(1,4,5,3,6))<\/em> will return 4.<\/li>\n\n\n\n<li><code>as.responsetime(happy)<\/code>: gives the response times of the question with label <em>happy<\/em>. Using this feature, it is possible to in real time adapt a questionnaire to a participant that is answering to quickly. <\/li>\n\n\n\n<li><code>as.question(happy<\/code>): gives you the question related to the question with label happy. For example &#8216;how happy are you now?&#8217;.<\/li>\n\n\n\n<li><code>sample.int(5,1)<\/code>: samples from an integers. In this case, one integer is generated from the numbers 1 to 5. In case of <em>sample.int(5,2)<\/em>, two integers are generated (without replacement).<\/li>\n\n\n\n<li><code>shewhart.UCL(a)<\/code>: if <em>a<\/em> is a list or vector of numbers, the <em>shewhart.UCL(a)<\/em> gives you the upper bound for <a href=\"https:\/\/psycnet.apa.org\/record\/2022-13254-001\">Shewhart procedures of process control.<\/a> <\/li>\n\n\n\n<li><code>shewhart.LCL(a)<\/code>: if <em>a<\/em> is a list or vector of numbers, the <em>shewhart.LCL(a)<\/em> gives you the lowerbound for <a href=\"https:\/\/psycnet.apa.org\/record\/2022-13254-001\">Shewhart procedures of process control.<\/a><\/li>\n\n\n\n<li><code>seq(1,5)<\/code>: gives you a sequence of integers 1 to 5.<\/li>\n\n\n\n<li><code>var(a)<\/code>: if a is a list or vector of numbers, <em>var <\/em>gives you the variance of these numbers<\/li>\n\n\n\n<li><code>sd(a)<\/code>: if a is a list or vector of numbers, <em>sd <\/em>gives you the standard deviation of these numbers<\/li>\n\n\n\n<li><code>distm(a,b)<\/code>: if <em>a<\/em> is a vector with a latitude and a longitude and <em>b <\/em>is a vector with a latidude and a longitude, <em>distm <\/em>will give you the distance between both points using the Haversine formula in meters. For example <em>distm(c(51.04, 4.488),c(52.14, 3.523)).<\/em> This can be useful if a location sensor is used.<\/li>\n\n\n\n<li><code>which(a)<\/code>: returns the position or the index of the value for which a is equal to 1. For example <em>which(c(1,0,1,0)) <\/em>would return <em>c(1,3)<\/em>. As such <em>which(happyList&gt;50)<\/em> returns a list of indexes where the numbers in happyList are larger than 50.<\/li>\n\n\n\n<li><code>sort(a)<\/code>: sorts this vector from low to high.<\/li>\n\n\n\n<li><code>unique(a)<\/code>: Returns a vector with all the unique values from a.<\/li>\n\n\n\n<li><code>getResponseTime(question_label)<\/code>: Returns the total time (in milliseconds) the participant spent answering a specific question.<\/li>\n\n\n\n<li><code>getLastChange(question_label)<\/code>: Returns the time elapsed (in milliseconds) from when the participant started the question until they made their final answer change..<\/li>\n\n\n\n<li><code>getMultipleChoiceAnswer(question_label)<\/code>: return a vector containing the string answers for a multiple choice question with label question_label.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-danger\">It is impossible to use labels with the name of a function in computation items. Choose a label that is not a function. For example <em>mean=3<\/em> will not work.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Combination of the above<\/h4>\n\n\n\n<p>Use the <em>()<\/em> brackets to work with nested expressions. For example statement<em> mean(c(max(c(happy,70)),sad))*2<\/em> can be found in the example questionnaire under the question with label &#8216;bracketExample&#8217;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Logical expressions<\/h3>\n\n\n\n<p>The following signs can be used to create a logical expression or an equation: <em>&gt;,&lt;,==,&lt;=<\/em> and <em>&gt;=<\/em>. If the expression is true, the result will be 1, if not, the result will be 0. Additionally, logical operators like <em>&amp;&amp;<\/em> and <em>||<\/em> can be used.<\/p>\n\n\n\n<p>For example<em> happy&gt;sad &amp;&amp; sad &gt; 50 <\/em> (see question with label &#8216;logicalStatement&#8217; in example questionnaire) will result in 1 only if the answer of &#8216;happy&#8217; is bigger than the answer of &#8216;sad&#8217; and &#8216;sad&#8217; is higher than 50.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">If else statements<\/h3>\n\n\n\n<p>It is also possible to use if else statements in the script. The following will set &#8216;ifElseVariable&#8217; to 1 if happy is bigger than sad. Otherwise it will be set to 0 (see question with label &#8216;ifElseVariable&#8217;).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if(happy&gt;sad){\n     ifElseVariable=1\n}else{\n     ifElseVariable=0\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Constants or predefined variables<\/h3>\n\n\n\n<p>It is possible to call predefined variables:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Sys.time<\/code>: the current time in seconds. This is in UTC time. If the current hour in local time is needed, one can use <em>as.hours(Sys.time)<\/em> (see functions above).<\/li>\n\n\n\n<li><code>system_nToday<\/code>: The number of notifications answered on that day by the user, including the current questionnaire. If this is equal to one, it means that the user answering the first notification of the day. If the same notification is answered twice, this number will not increase. This includes all scheduled notifications and follow-up notifications (but not manually sent notifications).<\/li>\n\n\n\n<li><code>system_nTodayL<\/code>: The number of questionnaires filled in on that day by the user, including the current questionnaire. If the same notification is answered twice, this number will increase.<\/li>\n\n\n\n<li><code>system_nThisWeek<\/code>: The number of notifications answered in the previous week. If the same notification is answered twice, this number will not increase. This includes all scheduled notifications and follow-up notifications (but not manually sent notifications).<\/li>\n\n\n\n<li><code>system_progToday<\/code>: the percentage of notifications answered by the participant on that day. Equals to system_nToday divided by the total number of notifications that are expected to be sent on that day.<\/li>\n\n\n\n<li><code>system_maxstreak<\/code>: The amount of consecutive days the participant has filled in their questionnaires.<\/li>\n\n\n\n<li><code>Sys.alias<\/code>: the current nickname of the participant.<\/li>\n\n\n\n<li><code>Sys.connectionId<\/code>: the connectionId of the participant in the context of this interaction.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conditional on computation question<\/h2>\n\n\n\n<p>Conditions can be defined for computation questions. The interactions or questions in the <em>yes<\/em> condition will only be shown if the result of the computation question was equal to 1. More specifically, it will check the answer from the label of the computation question. In the following example, this label is <em><em>conditionalComputation<\/em><\/em>. <\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">make sure the label of the computation question is equal to the variable that needs to be 0 or 1.<\/p>\n\n\n\n<p>If <em>conditionalComputation<\/em> is equal to 1, the yes condition will be triggerd. If <em>conditionalComputation<\/em> is 0, the no condition will be triggerd.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a0602dc4068f&quot;}\" data-wp-interactive=\"core\/image\" class=\"wp-block-image size-full is-style-default wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"965\" height=\"371\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/wp-content\/uploads\/2024\/04\/Capture.jpg\" alt=\"\" class=\"wp-image-12688\" srcset=\"\/wp-content\/uploads\/2024\/04\/Capture.jpg 965w, \/wp-content\/uploads\/2024\/04\/Capture-300x115.jpg 300w, \/wp-content\/uploads\/2024\/04\/Capture-768x295.jpg 768w, \/wp-content\/uploads\/2024\/04\/Capture-50x19.jpg 50w, \/wp-content\/uploads\/2024\/04\/Capture-60x23.jpg 60w, \/wp-content\/uploads\/2024\/04\/Capture-100x38.jpg 100w\" sizes=\"auto, (max-width: 965px) 100vw, 965px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">conditional question after computation question<\/figcaption><\/figure>\n\n\n\n<p>E.g. If the expression of the computation question was<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>conditionalComputation=0\nif(happy&gt;sad){\n    conditionalComputation=1\n}<\/code><\/pre>\n\n\n\n<p>the condition will be true if happy was actually bigger than sad, which will result in the answer 1 for the computation question (with label <em>conditionalComputation<\/em>). This is shown in the question with label &#8216;<em>conditionalComputation<\/em>&#8216; in the example questionnaire.<\/p>\n\n\n\n<p><a href=\"\/knowledge-base\/computation-item-r\/#logical-expressions\">Logical statements<\/a> can be used to add complex logic to the conditional structure of the questionnaire.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Answer validation<\/h3>\n\n\n\n<p>Using a <a href=\"\/knowledge-base\/command\/\">command <\/a>statement conditional on a computation question makes it possible to validate specific answers. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go back to the previous question when no answer option was given<\/li>\n\n\n\n<li>Go back to the previous question when the answer is not long enough (in case of a text based answer).<\/li>\n<\/ul>\n\n\n\n<p>Some examples of this are given in the <strong>Answer validation example<\/strong> questionnaire in the library. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use answers from previous questionnaires (load and save answers)<\/h2>\n\n\n\n<p>Using load and save statements, answers from previous questionnaires (at previous time points) can be loaded to execute more advanced expressions and (e.g. compute an average over time or even use time series models). This can be done by loading an answer beforehand <a href=\"\/knowledge-base\/load-answer\/\">using a load answer question type<\/a>. Afterwards the answer can be saved again using the <a href=\"\/knowledge-base\/save-answer\/\">save answer question type<\/a>. Regardless of where the save command is located in the script or questionnaire, the save will happen at the very end of the questionnaire, using the last available value of the answer\/variable. This means that any change made to it later in that questionnaire will be saved as well.<\/p>\n\n\n\n<p>It is also possible to incorporate load and save statements in a script. The following script (shown in saveLoadExample in the example questionnaire), a variable or answer &#8216;previousHappy&#8217; is loaded. If this answer is not yet available it is set to 50. Subsequently, &#8216;delta&#8217; is set to the difference between (current)  &#8216;happy&#8217; and &#8216;previousHappy&#8217;. Finally, &#8216;previousHappy&#8217; is overwritten and saved again.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>load(\"previousHappy\")\nif(is.na(previousHappy)){\n    previousHappy=50\n}\ndelta=happy-previousHappy\npreviousHappy=happy\nsave(\"previousHappy\")<\/code><\/pre>\n\n\n\n<p>For testing purposes (see below) it is also possible to unsave variables.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>unsave(\"previousHappy\")#unsaves or clears the variable previousHappy\nunsave(\"\") #unsaves or clears all saved variables<\/code><\/pre>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">Regardless of where the save or unsave command is located in the script or questionnaire, the save or unsave will happen only once the questionnaire is completed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Testing<\/h2>\n\n\n\n<p>Using computation questions it is possible to add very complex logic to interactions and questionnaires. However, due to this complexity it may be difficult to debug. Following tips may improve the ease of testing:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable <a href=\"\/knowledge-base\/how-to-test-your-research-project-on-m-path\/#go-into-debug-mode\">debug mode.<\/a> In debug mode, it is possible to look at all outcomes, also from computation items, during a questionnaire. Therefore, it is possible to immediately see the results of a computation, without having to download the data from the dashboard. <\/li>\n\n\n\n<li>Using the <em>unsave(&#8220;&#8221;)<\/em> <a href=\"\/knowledge-base\/computation-item-r\/#use-answers-from-previous-questionnaires-load-and-save-answers\">command <\/a> all saved variables are cleared. Now you don&#8217;t need to recreate a new participant to simulate going through a questionnaire for the first time, when no variables can be loaded yet. <\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Examples<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Example 1: Intervention after low depression construct<\/h3>\n\n\n\n<p>In this example (see &#8216;constructExample&#8217; in the example questionnaire) a construct is computed. Conditional on this construct an intervention is proposed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>averageAffect=mean(happy,reverse(sad))\nif(averageAffect&lt;20){\n    constructExample=1\n}else{\n    constructExample=0\n}<\/code><\/pre>\n\n\n\n<p>Additionally, the questionnaire &#8216;Affect construct computation example&#8217;, which can be found in the library, also applies this logic. First, multiple questions are asked about affect. Then a construct is computed based on these affect scores. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>affect_construct=mean(c(affect_1,affect_2,affect_3,reverse(affect_4),reverse(affect_5)))<\/code><\/pre>\n\n\n\n<p>Finally, a different text is shown based the construct.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example 2: Ask a question in 20% of the questionnaires<\/h3>\n\n\n\n<p>In this script (see &#8216;randomExample&#8217; in example questionnaire) a conditional question is asked in 20% of the cases. This can be done using following expression: <em>runif(1)&lt;0.2<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example 3: Propose intervention when participant scores relatively low<\/h3>\n\n\n\n<p>In this example (see question with label &#8216;relativelyLow&#8217;) an intervention is done when the current happy score is relatively low (within person).  The script is explained in the comments (parts after #)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>load(\"allHappyScores\")  # load all previous happy scores\nif(mean(is.na(allHappyScores))){\n   allHappyScores=c()   # set allHappyScores to empty array if it doesn't exist\n}\n\nallHappyScores=c(allHappyScores,happy) # add current happy score to array\nlowScoreCut=quantile(allHappyScores,0.1) # compute 10% percentile\n\n#only do when there are at least 10 measurements and the current score is low\nif(happy&lt;=lowScoreCut &amp;&amp; length(allHappyScores)&gt;=10){\n    relativelyLow=1\n}else{\n    relativelyLow=0\n}\n\nsave(\"allHappyScores\") # save array again<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Example 4: Compute running average<\/h3>\n\n\n\n<p>In this script (see &#8216;runningAverage&#8217; in example questionnaire), a running average is computed. This script has no need for arrays, which is therefore less heavy on the memory needs computation requirements.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>load(\"N\")  # load N, the total amount of measurments\nload(\"sumHappy\")    # load sumHappy, the sum of all previous happy answers\nif(is.na(N)){\n   N=0    # set N to 0 when it doesnt exist yet\n}\nif(is.na(sumHappy)){\n   sumHappy=0  # set sumHappy to 0 when it doesnt exist yet\n}\n\nN=N+1   # increase N\nsumHappy=sumHappy+happy  # add happy to sum\nrunningAverage=sumHappy\/N   # compute average\n\n# save variables\nsave(\"N\")\nsave(\"sumHappy\")\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Example 5: A random number test<\/h3>\n\n\n\n<p>This example can be used in a cognitive test where the app user has to remember a random number. First a random number is generated. Second, this number is visualized in the app. Third, the user can input a number. Lastly a computation item compares the inputted number to the original number to test if it was correct. The whole example can be found in the &#8216;Random Number Test&#8217; questionnaire in the library. To set a timer on each question see the &#8216;<a href=\"\/knowledge-base\/questions-general-settings\/#6-has-deadline\">has deadline<\/a>&#8216; setting.<\/p>\n\n\n<div class=\"wp-block-image is-resized\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"412\" height=\"868\" src=\"\/wp-content\/uploads\/2022\/03\/deadline.gif\" alt=\"\" class=\"wp-image-9918\"\/><figcaption class=\"wp-element-caption\">A visualization of this example in the app.<\/figcaption><\/figure><\/div>\n\n\n<p>In this example we will first create a random number with a specific length.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lengthNumber=5 # the length of the number\n\n# generate anumber with this length\nrange=(10^lengthNumber-1)-(10^(lengthNumber-1))\nrandomNumber=(10^(lengthNumber-1))+round(runif(1)*range)<\/code><\/pre>\n\n\n\n<p>Subsequently this random number will be shown using <a href=\"\/knowledge-base\/piping-from-a-previous-question\/\">piped text<\/a>. The question statement that was used is the following: number = <em>@INSERT{[randomNumber]}<\/em>.<\/p>\n\n\n\n<p>The app user can then fill in an open question with label &#8216;guessNumber&#8217;.<\/p>\n\n\n\n<p>In the last step the inputted number needs to be compared to the original number. As the inputted number is a string we also need to convert the random number to a string to compare both. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>guessNumber==as.character(randomNumber)<\/code><\/pre>\n\n\n\n<p>Conditional on this the user will see if he remembered the number correctly or not.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example 6: Time test<\/h3>\n\n\n\n<p>In this it is tested if  a certain amount of time has already passed since the last notification. The example can be found in the questionnaire in the library named &#8216;time check computation&#8217;. The main  computation code is found in the item with label &#8216;tooLong&#8217;:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>load('previousTime')\nif(is.na(previousTime)){\n  previousTime=0\n}\n\ncurrentTime=Sys.time\ntimeWindow=currentTime-previousTime\nif(timeWindow&gt;10){\n  tooLong=1\n}else{\n  tooLong=0\n}  <\/code><\/pre>\n\n\n\n<p>First, &#8216;previousTime&#8217; is loaded. If this variable doesn&#8217;t exist it is set to 0. Than the current time is extracted from the phone (in seconds).  If the elapsed time (timeWindow) is larger than 10, tooLong is set to 1. In this case, the conditional logic of the questionnaire will see tooLong as true and the participant will see the text &#8216;more than 10 seconds elapsed since previous beep&#8217; when the example questionnaire is used. At the end of the questionnaire, in a new computation item, previousTime is set to currentTime and saved. This way, the next time &#8216;previousTime&#8217; is loaded in a questionnaire, it is correct.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>previousTime=currentTime\nsave('previousTime')<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Example 7: First beep of the day test<\/h3>\n\n\n\n<p>In this easy example it is tested if a beep is the first notification of a day. This can be used such that questions about the previous night are only asked once, and only asked on the first notification that is filled in of the day. One just has to create a computation question with following script. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>system_nToday<\/em>==1<\/code><\/pre>\n\n\n\n<p><a href=\"\/knowledge-base\/computation-item-r\/#constants-or-predefined-variables\">As explained above<\/a>, <em>system_nToday<\/em> counts the number of notifications answered on a specific day.<\/p>\n\n\n\n<p>Conditional on this computation question, the additional questions can be posed. For example, when a participant misses the first four questionnaires\/notifications of a day but answers the fifth, the additional questions will be asked on the fifth.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example 8, add a question if time after 19:30<\/h3>\n\n\n\n<p>In this example, an additional question is added if a survey is answered after 19:30. First we get the current time. Then we check if this time is after 19:30 (local time). We set <em>doAdditionalQuestion <\/em>to 1 if that is the case. Make sure to also set <em>doAdditionalQuestion<\/em> as the label of the question if you want to pose conditional questions on this. This example can be found in the libary under <em>time check example<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>currentTime=Sys.time\ndoAdditionalQuestion=0\nif(as.hours(currentTime)&gt;=20){\n  doAdditionalQuestion=1\n}\nif(as.hours(currentTime)&gt;=19 &amp;&amp; as.minutes(currentTime)&gt;=30){\n  doAdditionalQuestion=1\n}<\/code><\/pre>\n\n\n\n<p>Often, it is unnecessary to use a computation to check the time of the participant. It is possible to create a schedule that includes multiple questions. Therefore, it is perfectly possible to create an evening questionnaire (send after 19:30) and other questionnaires (send before 19:30).<\/p>\n\n\n\n<p>Additionally, the current computation will also set <em>doAdditionalQuestion<\/em> to 0 if the survey is answered after 24:00. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example 9, ask additional question conditional on loaded variable<\/h3>\n\n\n\n<p>It is possible to first ask questions in a previous questionnaire and than later ask questions conditional on this answer. For example, in the <a href=\"\/knowledge-base\/intake-questionnaire\/\">intake<\/a> questionnaire you can have a yes\/no question &#8216;<em>Do you have a partner?<\/em>&#8216; with label <em>partner<\/em>. This answer can later be saved in the intake questionnaire using the <a href=\"\/knowledge-base\/save-answer\/\">save answer<\/a> type or the following computation statement:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>save('partner')<\/code><\/pre>\n\n\n\n<p>In a later questionnaire, it is possible to ask questions conditional on this answer using following code in a computation question with label <em>doExtraQuestion<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>load('partner') # load the answer\n# give the answer a value if it cannot be loaded\nif(is.na(partner)){\n  partner=0\n}\ndoExtraQuestion=(partner==1)<\/code><\/pre>\n\n\n\n<p>An example of this setup is shown in library questionnaires <strong>save load example part 1<\/strong> (for the saving of the answer) and <strong>save load example part 2<\/strong> (for the loading of the answer and the conditional question).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example 10, constructing a link<\/h3>\n\n\n\n<p>Sometimes you need to create a web link with certain arguments. This can be done with the paste functionality. For example, the following script will create a link that includes the connectionId of the particicipant:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>connectionId=Sys.connectionId<br>weblink=paste('https:\/\/m-path.io\/test\/testcomp.html?message=',connectionId)<\/code><\/pre>\n\n\n\n<p>The connectionId is also shown in the <a href=\"\/knowledge-base\/export-data\/#export-a-larger-dataset-for-statistical-analysis\">export<\/a>. For example, if the id would be 12, the link would become <a href=\"https:\/\/m-path.io\/test\/testcomp.html?message=12\">https:\/\/m-path.io\/test\/testcomp.html?message=12<\/a>. Later this link can be shown to the participant using <a href=\"\/knowledge-base\/questions-general-settings\/#formatted-text\">formatted text<\/a>.<\/p>\n\n\n\n<p>An example of how to use this in m-Path can be found in the library under the name <em>construct link with arguments<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example 11, creating a counter<\/h3>\n\n\n\n<p>Sometimes you need to count something. For example:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The amount of surveys a participant has filled in<\/li>\n\n\n\n<li>The amount of times the participant states he\/she is stressed<\/li>\n<\/ol>\n\n\n\n<p>You can create such a counter using a computation. The following script will always add one to the counter and save it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>load('counter')\n\nif(is.na(counter)){\ncounter=0 #set counter to 1 if it doesnt exit yet\n}\n\ncounter=counter+1 #increase counter\n\nsave('counter')\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In a Computation item, a mathematical computation is executed on the phone of the client, based on the client&#8217;s previous answers. This computation item or computation is not a real question as the script will just run on the phone of the participant\/client without him\/her noticing. The result of the&#8230;<\/p>\n","protected":false},"author":3,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[514,804],"ht-kb-tag":[294,189,288,819,228,816,822],"class_list":["post-9574","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-advanced-items","ht_kb_category-cool-stuff","ht_kb_tag-and-statement","ht_kb_tag-conditional","ht_kb_tag-constructs","ht_kb_tag-if-statement","ht_kb_tag-math","ht_kb_tag-mathematical-expression","ht_kb_tag-model"],"_links":{"self":[{"href":"https:\/\/app-manual-wp-001-atfsdabuggg7fzdq.germanywestcentral-01.azurewebsites.net\/wp-json\/wp\/v2\/ht-kb\/9574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app-manual-wp-001-atfsdabuggg7fzdq.germanywestcentral-01.azurewebsites.net\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/app-manual-wp-001-atfsdabuggg7fzdq.germanywestcentral-01.azurewebsites.net\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/app-manual-wp-001-atfsdabuggg7fzdq.germanywestcentral-01.azurewebsites.net\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/app-manual-wp-001-atfsdabuggg7fzdq.germanywestcentral-01.azurewebsites.net\/wp-json\/wp\/v2\/comments?post=9574"}],"version-history":[{"count":86,"href":"https:\/\/app-manual-wp-001-atfsdabuggg7fzdq.germanywestcentral-01.azurewebsites.net\/wp-json\/wp\/v2\/ht-kb\/9574\/revisions"}],"predecessor-version":[{"id":15614,"href":"https:\/\/app-manual-wp-001-atfsdabuggg7fzdq.germanywestcentral-01.azurewebsites.net\/wp-json\/wp\/v2\/ht-kb\/9574\/revisions\/15614"}],"wp:attachment":[{"href":"https:\/\/app-manual-wp-001-atfsdabuggg7fzdq.germanywestcentral-01.azurewebsites.net\/wp-json\/wp\/v2\/media?parent=9574"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/app-manual-wp-001-atfsdabuggg7fzdq.germanywestcentral-01.azurewebsites.net\/wp-json\/wp\/v2\/ht-kb-category?post=9574"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/app-manual-wp-001-atfsdabuggg7fzdq.germanywestcentral-01.azurewebsites.net\/wp-json\/wp\/v2\/ht-kb-tag?post=9574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}