I have data in table in vertical groups of 7 columns which I need to plot against each other to find relationships. How do I group them vertically in groups of 7 and what plots would be helpful for nice graphics? I looked at "car" which seems appropriate. A_0,A_1,A_2,A_3,A_4,A_5,A_6,B_0,B_1,B_2,B_3,B_4,B_5,B_6,C_0,C_1,C_2,C_3,C_4,C_5,C_6,D_0,D_1,D_2,D_3,D_4,D_5,D_6,D_0,D_1,D_2,D_3,D_4,D_5,D_6,E_0,E_1,E_2,E_3,E_4,E_5,E_6 0,2,0,0,1,1,1,0,1,0,0,1,1,1,0,0.000003,0,0,0.000004,0.000004,0.000004,0,1,0,0,1,1,1,0,2,0,0,1,1,1,0,0.000003,0,0,0.000002,0.000002,0.000002 2,1,0,0,0,0,4,2,1,0,0,0,0,4,0.000007,0.000003,0,0,0,0,0.000012,1,1,0,0,0,0,1,2,1,0,0,0,0,4,0.000003,0.000002,0,0,0,0,0.000006 1,0,0,0,0,4,1,1,0,0,0,0,4,1,0.000003,0,0,0,0,0.000012,0.000003,1,0,0,0,0,1,1,1,0,0,0,0,4,1,0.000002,0,0,0,0,0.000006,0.000002 1,0,0,1,0,0,1,1,0,0,1,0,0,1,0.000003,0,0,0.000003,0,0,0.000001,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0.000002,0,0,0.000001,0,0,0 0,1,0,0,1,2,3,0,1,0,0,1,2,3,0,0.000003,0,0,0.000001,0.000002,0.000003,0,1,0,0,1,1,1,0,1,0,0,1,2,3,0,0.000001,0,0,0,0.000001,0.000002 1,0,0,1,2,3,0,1,0,0,1,2,3,0,0.000003,0,0,0.000001,0.000002,0.000003,0,1,0,0,1,1,1,0,1,0,0,1,2,3,0,0.000001,0,0,0,0.000001,0.000002,0 1,0,0,0,2,0,2,1,0,0,0,2,0,2,0.000001,0,0,0,0.000002,0,0.000002,1,0,0,0,1,0,1,1,0,0,0,2,0,2,0,0,0,0,0.000001,0,0.000001 0,2,0,0,0,1,1,0,2,0,0,0,1,1,0,0.000002,0,0,0,0.000001,0.000001,0,1,0,0,0,1,1,0,2,0,0,0,1,1,0,0.000001,0,0,0,0.000001,0 2,0,0,0,1,1,2,2,0,0,0,1,1,2,0.000002,0,0,0,0.000001,0.000001,0.000002,1,0,0,0,1,1,1,2,0,0,0,1,1,2,0.000001,0,0,0,0.000001,0,0.000001 0,1,1,2,2,0,3,0,1,1,2,2,0,2,0,0.000001,0.000001,0.000002,0.000002,0,0.000003,0,1,1,1,1,0,1,0,1,1,2,2,0,3,0,0.000001,0,0.000001,0.000001,0,0.000001 1,1,2,2,0,3,1,1,1,2,2,0,2,1,0.000001,0.000001,0.000002,0.000002,0,0.000003,0.000001,1,1,1,1,0,1,1,1,1,2,2,0,3,1,0.000001,0,0.000001,0.000001,0,0.000001,0.000001 0,1,1,1,2,2,0,0,1,1,1,1,2,0,0,0.000001,0.000001,0.000001,0.000002,0.000002,0,0,1,1,1,1,1,0,0,1,1,1,2,2,0,0,0.000001,0.000001,0,0.000001,0.000001,0 0,1,1,0,0,0,12,0,1,1,0,0,0,6,0,0.000001,0.000001,0,0,0,0.000007,0,1,1,0,0,0,1,0,1,1,0,0,0,12,0,0,0,0,0,0,0.000006 1,1,0,0,0,12,34,1,1,0,0,0,6,15,0.000001,0.000001,0,0,0,0.000007,0.000017,1,1,0,0,0,1,1,1,1,0,0,0,12,34,0,0,0,0,0,0.000006,0.000015 1,0,0,0,12,34,1,1,0,0,0,6,15,0,0.000001,0,0,0,0.000007,0.000017,0.000001,1,0,0,0,1,1,1,1,0,0,0,12,34,1,0,0,0,0,0.000006,0.000015,0 1,0,13,4,11,9,10,0,0,1,2,1,5,7,0.000001,0,0.000002,0.000002,0.000002,0.000005,0.000008,1,0,1,1,1,1,1,1,0,13,4,11,9,10,0,0,0.000006,0.000002,0.000005,0.000004,0.000005 0,13,4,11,9,10,18,0,1,2,1,5,7,4,0,0.000002,0.000002,0.000002,0.000005,0.000008,0.000006,0,1,1,1,1,1,1,0,13,4,11,9,10,18,0,0.000006,0.000002,0.000005,0.000004,0.000005,0.000008 13,4,11,9,10,18,39,1,2,1,5,7,4,9,0.000002,0.000002,0.000002,0.000005,0.000008,0.000006,0.000011,1,1,1,1,1,1,1,13,4,11,9,10,18,39,0.000006,0.000002,0.000005,0.000004,0.000005,0.000008,0.000017 4,11,9,10,18,39,8,2,1,5,7,4,9,4,0.000002,0.000002,0.000005,0.000008,0.000006,0.000011,0.000005,1,1,1,1,1,1,1,4,11,9,10,18,39,8,0.000002,0.000005,0.000004,0.000005,0.000008,0.000017,0.000004 11,9,10,18,39,8,16,1,5,7,4,9,4,5,0.000002,0.000005,0.000008,0.000006,0.000011,0.000005,0.000006,1,1,1,1,1,1,1,11,9,10,18,39,8,16,0.000005,0.000004,0.000005,0.000008,0.000017,0.000004,0.000007 9,10,18,39,8,16,0,5,7,4,9,4,5,0,0.000005,0.000008,0.000006,0.000011,0.000005,0.000006,0,1,1,1,1,1,1,0,9,10,18,39,8,16,0,0.000004,0.000005,0.000008,0.000017,0.000004,0.000007,0 1,0,1,6,0,0,2,1,0,1,3,0,0,2,0.000001,0,0.000001,0.000003,0,0,0.000002,1,0,1,1,0,0,1,1,0,1,6,0,0,2,0,0,0,0.000003,0,0,0.000001 0,1,6,0,0,2,2,0,1,3,0,0,2,2,0,0.000001,0.000003,0,0,0.000002,0.000002,0,1,1,0,0,1,1,0,1,6,0,0,2,2,0,0,0.000003,0,0,0.000001,0.000001 0,2,2,0,0,8,4,0,2,2,0,0,8,4,0,0.000002,0.000002,0,0,0.000011,0.000006,0,1,1,0,0,1,1,0,2,2,0,0,17,19,0,0.000001,0.000001,0,0,0.000008,0.000009 2,2,0,0,8,4,1,2,2,0,0,8,4,1,0.000002,0.000002,0,0,0.000011,0.000006,0.000002,1,1,0,0,1,1,1,2,2,0,0,17,19,3,0.000001,0.000001,0,0,0.000008,0.000009,0.000001 2,0,0,8,4,1,1,2,0,0,8,4,1,2,0.000002,0,0,0.000011,0.000006,0.000002,0.000003,1,0,0,1,1,1,0.5,2,0,0,17,19,3,5,0.000001,0,0,0.000008,0.000009,0.000001,0.000002
Asked
Active
Viewed 86 times
-4
-
Please provide a **minimal, self contained example**. Check these links for general ideas, and how to do it in R: [**here**](http://stackoverflow.com/help/mcve), [**here**](http://www.sscce.org/), [**here**](http://adv-r.had.co.nz/Reproducibility.html), and [**here**](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610). You should also show us the **code you have tried**. – Henrik Apr 18 '14 at 18:54
1 Answers
0
Since you haven't put data or specified what sort of chart, I shall put untested code assuming a bubble plot -
library(ggplot2)
library(reshape2
datamelted <- melt(data, id.vars = 'ABcol')
ggplot(datamelted, aes(x = ABcol, y = variable, size = value) + geom_point()

TheComeOnMan
- 12,535
- 8
- 39
- 54
-
I think this is on right track.. but I think what would work is create datasets of all "_1" columns, "_2" columns and so on. Then I can plot various kinds of charts for all these 7 groups on single chart. – user3549576 Apr 18 '14 at 18:29
-
I suggest you put sample data and put your expected result in the question. I don't really get what you mean, and you can see the -1s pouring in. – TheComeOnMan Apr 18 '14 at 18:42
-
I have updated my question with actual data (fake column names). In my real data set there are many more columns (for each 7 experiments). Its CSV, I can attached a file if CP doesnt work. – user3549576 Apr 19 '14 at 13:12