Skip to content

7.7 Functions ​

PSPP functions provide mathematical abilities above and beyond those possible using simple operators. Functions have a common syntax: each is composed of a function name followed by a left parenthesis, one or more arguments, and a right parenthesis.

Function names are not reserved. Their names are specially treated only when followed by a left parenthesis, so that ‘EXP(10)’ refers to the constant value e raised to the 10th power, but ‘EXP’ by itself refers to the value of a variable called EXP.

The sections below describe each function in detail.

• MathematicsEXP LG10 LN LNGAMMA SQRT
• Miscellaneous MathematicsABS MOD MOD10 RND TRUNC
• TrigonometryACOS ARCOS ARSIN ARTAN ASIN ATAN COS SIN TAN
• Missing Value FunctionsMISSING NMISS NVALID SYSMIS VALUE
• Set MembershipANY RANGE
• Statistical FunctionsCFVAR MAX MEAN MEDIAN MIN SD SUM VARIANCE
• String FunctionsCONCAT INDEX LENGTH LOWER LPAD LTRIM NUMBER REPLACE RINDEX RPAD RTRIM STRING STRUNC SUBSTR UPCASE
• Time and DateCTIME.xxx DATE.xxx TIME.xxx XDATE.xxx DATEDIFF DATESUM
• Miscellaneous FunctionsLAG YRMODA VALUELABEL
• Statistical Distribution FunctionsPDF CDF SIG IDF RV NPDF NCDF

基于 GNU PSPP 2.0.1 手册与入门教程整理