Every so often I point out to a client who exclusively uses menus in SPSS that they can (and should) hit the Paste button instead of OK. Many times, the client never realized it was there.
I am here today to tell you that it is there, and it is wonderful. For a few reasons.
When you use the menus in SPSS, you’re really taking a shortcut. You’re telling SPSS which syntax commands, along with which options, you want to run.
Clicking OK at the end of a dialog box will run the menu options you just picked. You may never see the underlying commands that SPSS just ran.
If instead you hit Paste, those command won’t automatically be run, but will instead the code to run those commands will be copied into the Syntax window.
You can then, through the syntax window, run all or part of the syntax commands.
Having all your commands in the Syntax Window Saves so Much Time
I’ve already written about reasons to use syntax, so I won’t repeat myself. I’ll just mention that most of those are about saving time.
Just last week I met with a client who is nearly done with her dissertation.
She mentioned that she had started using syntax just recently, toward the end of her project. She wished she’d started earlier because it was so much easier and faster than running through the menus.
But she didn’t know about the Paste button. She’d been running each command, then copying the syntax out of her output into the syntax window.
You don’t have to remember every little command option
I was recently at a one-day regional statistics conference and attended an introductory talk about using R. It was less than an hour, so was really just a demonstration.
As you probably know, I am not a regular R user, but have some experience with it. So I was able to follow along pretty easily.
What struck me most was not that R was difficult (as seems to be the general perception), but that it could be very frustrating if you don’t use it on a regular basis.
It’s pretty logical, and the commands make sense. With some good basic training, it looks quite doable. What struck me though, is what an advantage the Paste button is in SPSS.
With the Paste button you don’t have to remember the exact syntax to get a command to run exactly the way you want it.
Need to run 20 different crosstabs but don’t remember the exact option to get row percentages? Just run one through the menus, and hit paste. Copy and paste it 19 times, then change the relevant variable names. Easy-peasy.
(Now, to be fair to R, there very well may be a way to do the same thing. The talk demonstrated quite clearly that using a plugin like R-Studio would make life much easier. I know there are a number of GUIs for R. If you know of one that does allows you to paste the code, please share in the comments.
And secondly, savvy programmers always save their code and edit it for other programs).
One way I like to use the Paste command to save time
If you’ve ever analyzed a large data set using the menus, you already know how tedious it can be to find the variables you need in the long list of variables. This is especially true when the variable names are all very similar.
It drives me nuts, personally.
So in my impatience, I’ve realized how to use Paste to my advantage. Let’s say I want to run a crosstab on two variables whose names I know, but I can’t find them in the list of variables.
But I also don’t remember the exact syntax commands.
I run a crosstab through the menus and pick any two variables. Paste the syntax.
Now I edit my syntax in the syntax window using the variable names I can remember without having to find them in a long list. Then I run it.
If you’d like to learn more about how to use SPSS, both in menus and syntax, take a look at our online workshop Introduction to Data Analysis with SPSS.