1

Hello all I have a data frame that looks like this

   vcv.index model.index par.index grid index  estimate         se       lcl       ucl fixed Primary Sex
1          6           6        16    A    16 0.8856129 0.07034495 0.6650065 0.9679442             1   F
2          7           7        17    A    17 0.6298085 0.06925362 0.4873071 0.7527946             2   F
3          8           8        18    A    18 0.6299329 0.06658399 0.4930294 0.7487096             3   F
4          9           9        19    A    19 0.6298073 0.05511803 0.5170043 0.7300226             4   F
5         10          10        20    A    20 0.7575780 0.05033492 0.6461752 0.8424570             5   F
6         21          21        61    B    61 0.8712803 0.07640191 0.6404038 0.9625845             1   F
7         22          22        62    B    62 0.6074361 0.06881164 0.4677850 0.7314780             2   F
8         23          23        63    B    63 0.6041038 0.06107390 0.4805314 0.7156737             3   F
9         24          24        64    B    64 0.5806663 0.06927518 0.4422311 0.7074705             4   F
10        25          25        65    B    65 0.7370924 0.05892159 0.6070616 0.8357368             5   F
11        41          41       121    C   121 0.8047651 0.09683670 0.5519029 0.9324112             1   F
12        42          42       122    C   122 0.5259543 0.07165185 0.3871407 0.6608688             2   F
13        43          43       123    C   123 0.5427102 0.07127190 0.4033297 0.6757102             3   F
14        44          44       124    C   124 0.5168940 0.06156377 0.3975699 0.6343222             4   F
15        45          45       125    C   125 0.6550035 0.07378427 0.5002863 0.7826314             5   F
16       196         196       586    A   586 0.8535576 0.08711021 0.5979391 0.9580602             1   M
17       197         197       587    A   587 0.5672181 0.07079460 0.4268475 0.6975683             2   M
18       198         198       588    A   588 0.5675404 0.06380437 0.4408554 0.6859682             3   M
19       199         199       589    A   589 0.5666988 0.06499677 0.4377245 0.6872281             4   M
20       200         200       590    A   590 0.7058527 0.05985742 0.5769525 0.8085129             5   M
21       211         211       631    B   631 0.8359801 0.09415382 0.5702268 0.9514068             1   M
22       212         212       632    B   632 0.5432876 0.07906137 0.3891407 0.6895670             2   M
23       213         213       633    B   633 0.5401000 0.06497578 0.4129088 0.6622738             3   M
24       214         214       634    B   634 0.5161817 0.06292617 0.3943413 0.6361283             4   M
25       215         215       635    B   635 0.6821666 0.07279913 0.5263900 0.8056259             5   M
26       226         226       676    C   676 0.7620894 0.10484134 0.5077061 0.9086707             1   M
27       227         227       677    C   677 0.4607459 0.07326857 0.3240289 0.6036357             2   M
28       228         228       678    C   678 0.4775193 0.08336355 0.3219411 0.6375852             3   M
29       229         229       679    C   679 0.4517796 0.06392891 0.3319493 0.5774748             4   M
30       230         230       680    C   680 0.5944339 0.07210424 0.4492079 0.7248249             5   M

I am trying to create a plot(s) that has the Primary along the X-axis and estimate on the Y-axix with one line for each of the Sex (M,F). Then I would want to make a total of 3 of these graphs each sorted by the grid (A,B, C). Then combine each of these into one figure. So it be a comparison of three plots by estimates and primary. I am getting some horribly wrong plots when I try to make it.

1 Answer 1

3
require(ggplot2)
ggplot(your_dataframe, aes(x=Primary, y=estimate, col=Sex)) + 
geom_line() + 
facet_wrap(~ grid)

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Wow, Thank you! I was definitely trying to make things more complex than they needed to be

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.