You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\f3\fs20 , meaning that for each element of x, a value of either
675
+
\f1\fs18 -1
676
+
\f3\fs20 ,
677
+
\f1\fs18 0
678
+
\f3\fs20 , or
679
+
\f1\fs18 1
680
+
\f3\fs20 will be returned as the corresponding element in the returned vector depending upon whether the original element was (respectively) negative, zero, or positive. If
Copy file name to clipboardExpand all lines: QtSLiM/help/EidosHelpFunctions.html
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,8 @@
99
99
<pclass="p3">Returns the <b>set-theoretic symmetric difference</b> of <spanclass="s2">x</span> and <spanclass="s2">y</span>, denoted <spanclass="s2">x</span><spanclass="s4">∆</span><spanclass="s2">y</span>: a vector containing all elements that are in <spanclass="s2">x</span> or <spanclass="s2">y</span>, but not in both.<spanclass="Apple-converted-space"></span>Duplicate elements will be stripped out, in the same manner as the <spanclass="s2">unique()</span> function.<spanclass="Apple-converted-space"></span>The order of elements in the returned vector is arbitrary and should not be relied upon.<spanclass="Apple-converted-space"></span>The returned vector will be of the same type as <spanclass="s2">x</span> and <spanclass="s2">y</span><spanclass="s3">,</span> and <spanclass="s2">x</span> and <spanclass="s2">y</span> must be of the same type.</p>
<pclass="p3">Returns the <b>set-theoretic union</b> of <spanclass="s2">x</span> and <spanclass="s2">y</span>, denoted <spanclass="s2">x</span><spanclass="s4">∪</span><spanclass="s2">y</span>: a vector containing all elements that are in <spanclass="s2">x</span> and/or <spanclass="s2">y</span>.<spanclass="Apple-converted-space"></span>Duplicate elements will be stripped out, in the same manner as the <spanclass="s2">unique()</span> function.<spanclass="Apple-converted-space"></span>This function is therefore roughly equivalent to <spanclass="s2">unique(c(x, y))</span>, but this function will probably be faster.<spanclass="Apple-converted-space"></span>The order of elements in the returned vector is arbitrary and should not be relied upon.<spanclass="Apple-converted-space"></span>The returned vector will be of the same type as <spanclass="s2">x</span> and <spanclass="s2">y</span><spanclass="s3">,</span> and <spanclass="s2">x</span> and <spanclass="s2">y</span> must be of the same type.</p>
102
+
<pclass="p4">(numeric)sign(numeric x)</p>
103
+
<pclass="p5">Returns the <b>sign</b> of <spanclass="s2">x</span>, meaning that for each element of x, a value of either <spanclass="s2">-1</span>, <spanclass="s2">0</span>, or <spanclass="s2">1</span> will be returned as the corresponding element in the returned vector depending upon whether the original element was (respectively) negative, zero, or positive.<spanclass="Apple-converted-space"></span>If <spanclass="s2">x</span> is <spanclass="s2">integer</span>, an <spanclass="s2">integer</span> vector is returned; if <spanclass="s2">x</span> is <spanclass="s2">float</span>, a <spanclass="s2">float</span> vector is returned.</p>
Copy file name to clipboardExpand all lines: VERSIONS
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ development head (in the master branch):
14
14
add a define of TSK_TRACE_ERRORS in Xcode for slim and SLiMguiLegacy, in DEBUG only, for easier tskit debugging; break on _tsk_trace_error()
15
15
fix a regression that caused the sourceSubpop pseudo-parameter to be NULL in modifyChild() callbacks in all cases; add tests, improve documentation (#522)
16
16
add chromosomeSubposition property to Haplosome, providing whether the haplosome is index 0 or 1 within its individual, within the set of haplosomes for its associated chromosome
17
+
add a (numeric)sign(numeric x) function that returns the sign (-1, 0, 1) of each element
0 commit comments