I need to manually enter some sample data. What’s wrong with the following example where I’m trying to include a string? Thanks in advance. data list free / V1 V2 V3 (a3) begin data. 1, 2, "XYZ" end data. execute. |
data list free / V1 V2 (2F1.0) V3 (a3)
===================== 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 |
To expand on David's response, if you have anything other than unformatted numbers, you need to identify the data types (including the unformatted numbers). On Wed, Oct 10, 2018, 9:12 AM David Marso <[hidden email]> wrote: data list free / V1 V2 (2F1.0) V3 (a3) |
Note the missing dot at the end of the first line. Mario Giesel Munich, Germany
Am Mittwoch, 10. Oktober 2018, 16:17:40 MESZ hat Rick Oliver <[hidden email]> Folgendes geschrieben:
To expand on David's response, if you have anything other than unformatted numbers, you need to identify the data types (including the unformatted numbers). On Wed, Oct 10, 2018, 9:12 AM David Marso <[hidden email]> wrote: data list free / V1 V2 (2F1.0) V3 (a3) |
In reply to this post by Rick Oliver
Thanks. I don’t deal with strings often. I didn’t realise that I had to define the numbers also. Jeff From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Rick Oliver To expand on David's response, if you have anything other than unformatted numbers, you need to identify the data types (including the unformatted numbers). On Wed, Oct 10, 2018, 9:12 AM David Marso <[hidden email]> wrote:
===================== 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 |
Well, technically, there is a way to intersperse explicitly defined strings with default format numbers using an asterisk, but my experience with it has been...suboptimal. Safer and non-ambiguous to define formats for all variables. If you have a bunch of contiguous numeric variables, you can define the format for all of them with a single format specification, as in David's example of (2F1.0). The asterisk trick would also work in that example, as in: v1 v2 * v3 (a3). But anything much more complicated than that, and it tends to not work. The documentation seems a little vague on the subject, or at least my cursory exploration didn't yield anything more specific. On Wed, Oct 10, 2018 at 2:47 PM Jeff <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |