newbie pivot issue

8 views
Skip to first unread message

stratawing

unread,
Feb 21, 2012, 3:40:50 PM2/21/12
to crush-tools
Howdy - Great tools!

Just have a small issue with my first outing using pivot -- my results
all seem to be converted to numbers for some reason.

Input file is as follows:

Row|Col|Rec
1|A|050911v1
2|A|Source Name
2|B|Sample Name
2|C|Parameter
2|D|Result
2|E|Qualifier
... etc

script is as follows:

cat input | pivot -k -F Row -P Col -A Rec -d '|'

Output looks like this:

Row|A: Rec|B: Rec|C: Rec|D: Rec|E: Rec|F: Rec|G: Rec|H: Rec|I:
Rec
1|50911.00000000000|0.00000000000|0.00000000000|0.00000000000|
0.00000000000|0.00000000000|0.00000000000|0.00000000000 ... etc
10|100.00000000000|5066211.00000000000|0.00000000000|0.00000000000|
0.00000000000|0.00000000000|0.00000000000|0.000000 ... etc
100|100.00000000000|5066211.00000000000|2.00000000000|0.00000000000|
0.00000000000|0.00000000000|0.00000000000|0.00000 ... etc
1000|100.00000000000|5066217.00000000000|0.00000000000|0.00000000000|
0.00000000000|0.00000000000|0.00000000000|0.0000 ... etc
10000|204.00000000000|0.00000000000|1.00000000000|5.30000000000|
0.00000000000|0.00000000000|0.00000000000 ... etc

Any thoughts?

stratawing

unread,
Feb 22, 2012, 11:11:42 AM2/22/12
to crush-tools
Any suggestions on this would be greatly appreciated. I'm sure it's
something very simple that I'm missing.

jeremy hinds

unread,
Feb 22, 2012, 11:39:13 AM2/22/12
to crush...@googlegroups.com
On Wed, Feb 22, 2012 at 9:11 AM, stratawing <strat...@gmail.com> wrote:
> Any suggestions on this would be greatly appreciated.  I'm sure it's
> something very simple that I'm missing.

Unfortunately, you're not missing anything. The value-fields contents
are coerced to numbers (and summed up if the pivot-fields repeat for a
given set of output-fields).

It would be nice to support this use-case. Would you mind logging an
issue at http://code.google.com/p/crush-tools/issues/list to help us
keep track of it?

>
> --
> You received this message because you are subscribed to the Google Groups "crush-tools" group.
> To post to this group, send email to crush...@googlegroups.com.
> To unsubscribe from this group, send email to crush-tools...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/crush-tools?hl=en.
>

--

http://selfpoweredlife.blogspot.com

Reply all
Reply to author
Forward
0 new messages