Windows clipboard?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows clipboard?

Bob Schacht-3
I'm trying to harmonize two cases from the same person in SPSS (ver. 12).
A respondent's answers to the same open-ended question were different the
second time from the first. I just want to copy the text from the first
answer and paste it at the beginning of the text for the second answer
(second case), but SPSS doesn't seem to want me to do that. I can *copy*
the whole cell and paste that whole cell into the same cell for the second
case, but I can't seem to insert the text of the first at the beginning of
the second. I am trying to do this
in the data window for the selected cell just below the toolbar.

I can copy both responses to a Word document, inserting one comment before
the other, but when I highlight both comments and copy, when I try to paste
the combined comment in the cell for the second case in the SPSS database,
it won't paste.

What am I doing wrong?

Bob in HI
Reply | Threaded
Open this post in threaded view
|

Re: Windows clipboard?

Art Kendall
What is the length of the string variable you are working with?  iF not
copy it into a new variable that is wide enough to hold all of the text
then try the paste from Word.

If the variable is wide enough to hold all of the information and there
is one case that needs to be fixed:

if caseid eq 12345 vara = 'what if much if a which of a wind should give
a truth to summers lie?'.

if there are many cases create a file with 2 variables caseid and vara.
then use the UPDATE procedure



Art Kendall
Social Research Consultants

Bob Schacht wrote:

> I'm trying to harmonize two cases from the same person in SPSS (ver. 12).
> A respondent's answers to the same open-ended question were different the
> second time from the first. I just want to copy the text from the first
> answer and paste it at the beginning of the text for the second answer
> (second case), but SPSS doesn't seem to want me to do that. I can *copy*
> the whole cell and paste that whole cell into the same cell for the
> second
> case, but I can't seem to insert the text of the first at the
> beginning of
> the second. I am trying to do this
> in the data window for the selected cell just below the toolbar.
>
> I can copy both responses to a Word document, inserting one comment
> before
> the other, but when I highlight both comments and copy, when I try to
> paste
> the combined comment in the cell for the second case in the SPSS
> database,
> it won't paste.
>
> What am I doing wrong?
>
> Bob in HI
>
>
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Windows clipboard?

Bob Schacht-3
At 11:02 AM 12/15/2006, Art Kendall wrote:
>What is the length of the string variable you are working with?  iF not
>copy it into a new variable that is wide enough to hold all of the text
>then try the paste from Word.

This led me on the right path. Variable width (and display width) were not
wide enough. I could insert the additional text manually, but not by
pasting. When the width limit is hit, I just can't enter any more text, no
matter where the cursor is within the data entry window.

So why can't I paste into the data window? Too many hidden spaces?

Also, SPSS (at least in ver 12)  right-pads the cell width with blanks.
Let me explain with an example. I have a string field, width 255, display
width 121. The text in the field is
"The doctors, & clinics have been nice & helpfull. The ones with problems
are: SSI, SSD, Medicare, and Insurance companys."
(without the quotes), i.e., 121 characters with spaces. However, this is
right-padded with blanks, so the actual character count for the cell is 255
(of course because this is the string width).

On my screen, this cell occupies the full width of available space, about
13 1/3 inches. But the right-most   3+ inches are blank. If I try to
manually move the field endline to the left,   just a few spaces,  SPSS
immediately crops about 17 characters off the end of the text (not the
blanks), so that I'm still left with 3 inches of blank space at the end of
the cell. In other words, SPSS forces a lot of blank space as part of the
display width that I can't seem to get rid of.

Is there anything I can do about that?
Bob



>If the variable is wide enough to hold all of the information and there is
>one case that needs to be fixed:
>
>if caseid eq 12345 vara = 'what if much if a which of a wind should give a
>truth to summers lie?'.
>
>if there are many cases create a file with 2 variables caseid and vara.
>then use the UPDATE procedure
>
>
>
>Art Kendall
>Social Research Consultants
>
>Bob Schacht wrote:
>
>>I'm trying to harmonize two cases from the same person in SPSS (ver. 12).
>>A respondent's answers to the same open-ended question were different the
>>second time from the first. I just want to copy the text from the first
>>answer and paste it at the beginning of the text for the second answer
>>(second case), but SPSS doesn't seem to want me to do that. I can *copy*
>>the whole cell and paste that whole cell into the same cell for the second
>>case, but I can't seem to insert the text of the first at the beginning of
>>the second. I am trying to do this
>>in the data window for the selected cell just below the toolbar.
>>
>>I can copy both responses to a Word document, inserting one comment before
>>the other, but when I highlight both comments and copy, when I try to paste
>>the combined comment in the cell for the second case in the SPSS database,
>>it won't paste.
>>
>>What am I doing wrong?
>>
>>Bob in HI
Reply | Threaded
Open this post in threaded view
|

Re: Windows clipboard?

Hal 9000
Bob,

>Is there anything I can do about that?

If you have a lot of these kinds of little adjustments which require a
personal touch, and which can't be automated (I have a term for this kind of
data: "Unusable"), then you might be better off saving it into Excel, doing
the manual work there, and opening it again in SPSS.

I dread having to use SPSS like a spreadsheet tool. In a way, I like how
poor the spreadsheet interface is because it disinclines me and others to
"touch" the data.

If you can simply compute a new variable which is (comment1) + (comment2) =
(combined1 & 2), that's a lot better. That rarely results in legible
outcomes, sadly, but it still might save some time to get them all in place
first and then edit within the cell as needed. Just be sure you make a
really long string variable to hold the combination of 1 & 2, and be sure to
use [RTRIM(comment1)] to trim trailing spaces when you compute the new
combined var.

string AllComments (a300).
- I am told variables this long are a bad idea, but I do it anyway.

Gary
Reply | Threaded
Open this post in threaded view
|

Re: Windows clipboard?

Hal 9000
Bob, this may be a bit clumsy, and of course I don't know what the real data
looks like, but perhaps you could do something like this:

* some fake data .

new file.
data list free /id (f3) comment (a20).
begin data
14 'A Comment'
15 'Comment Number One'
150 'Comment Number Two'
16 'Another Comment'
end data.

* sorted so that the 2 cases are
  just next to one another, and say
  id = 150 is the case you want to
  retain.

sort cases by id.
string NewComment (a40).
do if id = 150.
compute NewComment = concat(rtrim(comment), ' / ', rtrim(lag(comment))).
else.
compute NewComment = comment.
end if.

select if id <> 15.
exe.

Might not be rhe right approach for this particular task, but it has the
benefit of documenting and allowing you to undo/redo these changes so long
as you do everything on the original data in this way.

-Gary


On 12/15/06, Bob Schacht <[hidden email]> wrote:

>
> At 01:52 PM 12/15/2006, Hal 9000 wrote:
> >Bob,
> >
> > >Is there anything I can do about that?
> >
> >If you have a lot of these kinds of little adjustments which require a
> >personal touch, and which can't be automated (I have a term for this kind
> >of data: "Unusable"), then you might be better off saving it into Excel,
> >doing the manual work there, and opening it again in SPSS.
> >
> >I dread having to use SPSS like a spreadsheet tool. In a way, I like how
> >poor the spreadsheet interface is because it disinclines me and others to
> >"touch" the data.
> >
> >If you can simply compute a new variable which is (comment1) + (comment2)
> >= (combined1 & 2), that's a lot better.
>
> Yeah, but in this case its ONE field and TWO cases, not vv., e.g.
>
> CASE ID, Month, Name, Life's problems
> Case 15, August, Cindy, Try to find work and housing at same time makes my
> condition worse.
> Case 150, November, Cindy, I am afraid of being homeless and need long
> term
> low income housing.
>
> Cindy has snuck in and done the survey twice, whereas most people only do
> it once. I need to have only one case for Cindy, so she doesn't get 2
> votes
> while everyone else gets 1, but its ok for her to have multiple problems.
>
> Bob
>
> >  That rarely results in legible outcomes, sadly, but it still might save
> > some time to get them all in place first and then edit within the cell
> as
> > needed. Just be sure you make a really long string variable to hold the
> > combination of 1 & 2, and be sure to use [RTRIM(comment1)] to trim
> > trailing spaces when you compute the new combined var.
> >
> >string AllComments (a300).
> >- I am told variables this long are a bad idea, but I do it anyway.
> >
> >Gary
> >
>
>