Good Morning all,
I am having issues while replacing or recoding my data in SPSS since for a few of the string variables there seems to be some hidden space in the strings which is visible when you double click on that character. I have tried by using REPLACE((LTRIM(RTRIM(UPCASE(Statusincare))))," ","") , however upon double clicking i still see a blank space between the characters. I have a huge dataset of over 30 lakh records and i need to do this urgently. Please kindly help. I am also attaching a SS of the same. <http://spssx-discussion.1045642.n5.nabble.com/file/t341572/Hidden_Space.png> -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Hi, I guess it must be a non breaking spaces. Save data as excel and remove those non breaking space by excel formula and import back to spss. On Sat, Feb 9, 2019, 12:12 PM Smruti Mokal <[hidden email]> wrote: Good Morning all, |
Thanks for your prompt reply. It worked with the excel. But I am having
similar issues in multiple variables and since I have large data set.. its not possible for me to do the same things each time. Is there no syntax by which this error can be resolved? -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
The syntax below will remove any NBSP characters across all the string variables in the file. It requires the SPSSINC SELECT VARIABLES extension command, which can be installed from Extensions > Extension Hub if you don't already have it. That command is used to define a macro listing all the string variables in the file. Then the DO REPEAT block iterates over them and replaces the nonbreaking space character with nothing, i.e, it eliminates it. Important: This code assumes you are running in Unicode mode, and the code contains the Unicode NBSP character. I am not sure that this will survive transmission in the listserv, so I will also send the syntax as an attachment in a separate message. If you are not in Unicode mode, the code might still work, but if it doesn't, I can send a modified version. * Encoding: UTF-8. # This file is in utf8. The blank in the compute statement is a NBSP. SPSSINC SELECT VARIABLES MACRONAME="!allstrings" /PROPERTIES TYPE=STRING. do repeat #var = !allstrings. compute #var = replace(#var, " ", ""). end repeat. exec. On Sat, Feb 9, 2019 at 3:46 AM Smruti Mokal <[hidden email]> wrote: Thanks for your prompt reply. It worked with the excel. But I am having |
Please, what does NBSP mean. I’ve never seen it before.
From: SPSSX(r) Discussion <[hidden email]>
On Behalf Of Jon Peck The syntax below will remove any NBSP characters across all the string variables in the file. It requires the SPSSINC SELECT VARIABLES extension command, which can be installed from Extensions > Extension
Hub if you don't already have it. That command is used to define a macro listing all the string variables in the file. Then the DO REPEAT block iterates over them and replaces the nonbreaking space character with nothing, i.e, it eliminates it. Important: This code assumes you are running in Unicode mode, and the code contains the Unicode NBSP character. I am not sure that this will survive transmission in the listserv, so I will also send the
syntax as an attachment in a separate message. If you are not in Unicode mode, the code might still work, but if it doesn't, I can send a modified version. * Encoding: UTF-8. # This file is in utf8. The blank in the compute statement is a NBSP. SPSSINC SELECT VARIABLES MACRONAME="!allstrings" /PROPERTIES TYPE=STRING. do repeat #var = !allstrings. compute #var = replace(#var, " ", ""). end repeat. exec. On Sat, Feb 9, 2019 at 3:46 AM Smruti Mokal <[hidden email]> wrote:
-- Jon K Peck ===================== To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
|
NBSP refers to the non-breaking space character. It looks like a blank, but line-wrapping code won't break a line at it. It's particularly common in French orthography, where a colon is typically set off from the preceding word by a visual blank. &NBSP; refers to this character entity in html text, too. You can use it in variable names in Statistics if you want multi-word names (and want to confuse people). You can enter it on a keyboard as alt-0160 on the number pad. On Sat, Feb 9, 2019 at 12:07 PM Maguin, Eugene <[hidden email]> wrote:
|
In reply to this post by Maguin, Eugene
Hi Jon,
Thank for your reply and the syntax. I tried the syntax on a few of my variables but it is eliminating all the spaces throughout the variables but it wont delete the hidden space which is yet visible after double clicking on the character. -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Free forum by Nabble | Edit this page |