Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Setting all variables to 0 decimals?

513 views
Skip to first unread message

Tan

unread,
Feb 6, 2012, 2:10:19 PM2/6/12
to
Hello everyone,

I'm a newbie when it comes to SPSS.. I have a dataset with
700something numeric variables. what's the easiest wa to set all of
these variables to 0 decimal on the variable list?

Thanks
Tan

Andy W

unread,
Feb 6, 2012, 4:01:46 PM2/6/12
to
If all of the variables in the dataset are numeric you can use

FORMATS ALL (F8.0).

Where the format specified in the parenthesis after the period gives
the desired number of decimal places. If not all of the variables are
numeric you can use a TO statement, such as;

FORMATS V1 to V50 (F8.0).

This is nice because you can sort variables by whether they are
numeric, and then get them all in one swoop with a TO statement. Note
this just changes the variable format in the display, it doesn't alter
the data.

Andy W
0 new messages