diff --git a/c/mapping/mapper_nest.c b/c/mapping/mapper_nest.c index 550b53132..2e2ae8a78 100644 --- a/c/mapping/mapper_nest.c +++ b/c/mapping/mapper_nest.c @@ -82,20 +82,21 @@ static void mapper_nest_usage(FILE* o, char* argv0, char* verb) { fprintf(o, "\n"); fprintf(o, " %s %s --explode --values --across-fields -f x\n", argv0, verb); fprintf(o, " with input record \"x=a;b;c,y=d\" produces output records\n"); - fprintf(o, " \"y=d,x_1=a,x_2=b,x_3=c\"\n"); + fprintf(o, " \"x_1=a,x_2=b,x_3=c,y=d\"\n"); fprintf(o, " Use --implode to do the reverse.\n"); fprintf(o, "\n"); fprintf(o, " %s %s --explode --pairs --across-records -f x\n", argv0, verb); fprintf(o, " with input record \"x=a:1;b:2;c:3,y=d\" produces output records\n"); - fprintf(o, " \"y=d,a=1\"\n"); - fprintf(o, " \"y=d,b=2\"\n"); - fprintf(o, " \"y=d,c=3\"\n"); + fprintf(o, " \"a=1,y=d\"\n"); + fprintf(o, " \"b=2,y=d\"\n"); + fprintf(o, " \"c=3,y=d\"\n"); fprintf(o, "\n"); fprintf(o, " %s %s --explode --pairs --across-fields -f x\n", argv0, verb); fprintf(o, " with input record \"x=a:1;b:2;c:3,y=d\" produces output records\n"); - fprintf(o, " \"y=d,a=a,b=2,c=3\"\n"); + fprintf(o, " \"a=1,b=2,c=3,y=d\"\n"); + fprintf(o, "\n"); fprintf(o, "Notes:\n"); fprintf(o, "* With --pairs, --implode doesn't make sense since the original field name has\n"); diff --git a/c/reg_test/expected/out b/c/reg_test/expected/out index 1db779065..61f3f126f 100644 --- a/c/reg_test/expected/out +++ b/c/reg_test/expected/out @@ -2978,10 +2978,10 @@ y=d:40,x=a:1;b:2;c:3 y=d:70,x=a:4;b:5 mlr nest --explode --pairs --across-fields -f x ./reg_test/input/nest-explode.dkvp -y=d:40,a=1,b=2,c=3 +a=1,b=2,c=3,y=d:40 y=d:50 u=100,y=d:60 -y=d:70,a=4,b=5 +a=4,b=5,y=d:70 mlr nest --explode --pairs --across-records -f x ./reg_test/input/nest-explode.dkvp a=1,y=d:40 diff --git a/doc/mlr.1 b/doc/mlr.1 index 0a50f9189..cbd06347f 100644 --- a/doc/mlr.1 +++ b/doc/mlr.1 @@ -2,12 +2,12 @@ .\" Title: mlr .\" Author: [see the "AUTHOR" section] .\" Generator: ./mkman.rb -.\" Date: 2016-02-17 +.\" Date: 2016-02-18 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "MILLER" "1" "2016-02-17" "\ \&" "\ \&" +.TH "MILLER" "1" "2016-02-18" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Portability definitions .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -717,18 +717,18 @@ Examples: mlr nest --explode --values --across-fields -f x with input record "x=a;b;c,y=d" produces output records - "y=d,x_1=a,x_2=b,x_3=c" + "x_1=a,x_2=b,x_3=c,y=d" Use --implode to do the reverse. mlr nest --explode --pairs --across-records -f x with input record "x=a:1;b:2;c:3,y=d" produces output records - "y=d,a=1" - "y=d,b=2" - "y=d,c=3" + "a=1,y=d" + "b=2,y=d" + "c=3,y=d" mlr nest --explode --pairs --across-fields -f x with input record "x=a:1;b:2;c:3,y=d" produces output records - "y=d,a=a,b=2,c=3" + "a=1,b=2,c=3,y=d" Notes: * With --pairs, --implode doesn't make sense since the original field name has diff --git a/doc/reference.html b/doc/reference.html index b53eac5e5..058abbf89 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -2119,18 +2119,18 @@ Examples: mlr nest --explode --values --across-fields -f x with input record "x=a;b;c,y=d" produces output records - "y=d,x_1=a,x_2=b,x_3=c" + "x_1=a,x_2=b,x_3=c,y=d" Use --implode to do the reverse. mlr nest --explode --pairs --across-records -f x with input record "x=a:1;b:2;c:3,y=d" produces output records - "y=d,a=1" - "y=d,b=2" - "y=d,c=3" + "a=1,y=d" + "b=2,y=d" + "c=3,y=d" mlr nest --explode --pairs --across-fields -f x with input record "x=a:1;b:2;c:3,y=d" produces output records - "y=d,a=a,b=2,c=3" + "a=1,b=2,c=3,y=d" Notes: * With --pairs, --implode doesn't make sense since the original field name has