Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is a solution which gives you six dataframes, in the following order:</p> <pre><code>diff_eve &lt;1 diff_mor &lt;1 diff_tot &lt;1 diff_eve &gt;1 diff_mor &gt;1 diff_tot &gt;1 </code></pre> <p>Code:</p> <pre><code> cols &lt;- c("diff_eve", "diff_mor", "diff_tot") c(lapply(cols, function(x)subset(tbl_comp, eval(parse(text=x))&lt;1)), lapply(cols, function(x)subset(tbl_comp, eval(parse(text=x))&gt;1))) </code></pre> <p>gives you </p> <pre><code>[[1]] Meve_mean Mmor_mean Mtot_mean tot_meanMe tot_meanMm tot_sdMe tot_sdMm Wteve_mean Wtmor_mean Wttot_mean tot_meanwte tot_meanwtm tot_sdwte tot_sdwtm diff_eve diff_mor diff_tot 1 7774.442 39113.53 23443.99 258492587 246665241 35569170 30522100 10752.44 29254.64 18681.95 278901500 235415567 16743477 3922418 0.7230399 1.3370026 1.2549002 2 43374.117 119476.16 81425.14 NA NA NA NA 53658.84 98804.80 73007.11 NA NA NA NA 0.8083312 1.2092141 1.1153042 3 585562.724 1296530.34 941046.53 NA NA NA NA 715547.92 1001344.20 838032.04 NA NA NA NA 0.8183417 1.2947899 1.1229243 5 320338.198 209092.54 264715.37 NA NA NA NA 335384.20 217110.41 284695.43 NA NA NA NA 0.9551380 0.9630701 0.9298195 6 918368.020 577355.58 747861.80 NA NA NA NA 1013708.19 571826.16 824330.18 NA NA NA NA 0.9059491 1.0096698 0.9072357 [[2]] Meve_mean Mmor_mean Mtot_mean tot_meanMe tot_meanMm tot_sdMe tot_sdMm Wteve_mean Wtmor_mean Wttot_mean tot_meanwte tot_meanwtm tot_sdwte tot_sdwtm diff_eve diff_mor diff_tot 5 320338.2 209092.5 264715.4 NA NA NA NA 335384.2 217110.4 284695.4 NA NA NA NA 0.955138 0.9630701 0.9298195 [[3]] Meve_mean Mmor_mean Mtot_mean tot_meanMe tot_meanMm tot_sdMe tot_sdMm Wteve_mean Wtmor_mean Wttot_mean tot_meanwte tot_meanwtm tot_sdwte tot_sdwtm diff_eve diff_mor diff_tot 5 320338.2 209092.5 264715.4 NA NA NA NA 335384.2 217110.4 284695.4 NA NA NA NA 0.9551380 0.9630701 0.9298195 6 918368.0 577355.6 747861.8 NA NA NA NA 1013708.2 571826.2 824330.2 NA NA NA NA 0.9059491 1.0096698 0.9072357 [[4]] Meve_mean Mmor_mean Mtot_mean tot_meanMe tot_meanMm tot_sdMe tot_sdMm Wteve_mean Wtmor_mean Wttot_mean tot_meanwte tot_meanwtm tot_sdwte tot_sdwtm diff_eve diff_mor diff_tot 4 3866.547 23511.3 13688.92 NA NA NA NA 3422.172 11541.89 6902.05 NA NA NA NA 1.129852 2.037041 1.983313 [[5]] Meve_mean Mmor_mean Mtot_mean tot_meanMe tot_meanMm tot_sdMe tot_sdMm Wteve_mean Wtmor_mean Wttot_mean tot_meanwte tot_meanwtm tot_sdwte tot_sdwtm diff_eve diff_mor diff_tot 1 7774.442 39113.53 23443.99 258492587 246665241 35569170 30522100 10752.438 29254.64 18681.95 278901500 235415567 16743477 3922418 0.7230399 1.337003 1.2549002 2 43374.117 119476.16 81425.14 NA NA NA NA 53658.844 98804.80 73007.11 NA NA NA NA 0.8083312 1.209214 1.1153042 3 585562.724 1296530.34 941046.53 NA NA NA NA 715547.922 1001344.20 838032.04 NA NA NA NA 0.8183417 1.294790 1.1229243 4 3866.547 23511.30 13688.92 NA NA NA NA 3422.172 11541.89 6902.05 NA NA NA NA 1.1298517 2.037041 1.9833127 6 918368.020 577355.58 747861.80 NA NA NA NA 1013708.188 571826.16 824330.18 NA NA NA NA 0.9059491 1.009670 0.9072357 [[6]] Meve_mean Mmor_mean Mtot_mean tot_meanMe tot_meanMm tot_sdMe tot_sdMm Wteve_mean Wtmor_mean Wttot_mean tot_meanwte tot_meanwtm tot_sdwte tot_sdwtm diff_eve diff_mor diff_tot 1 7774.442 39113.53 23443.99 258492587 246665241 35569170 30522100 10752.438 29254.64 18681.95 278901500 235415567 16743477 3922418 0.7230399 1.337003 1.254900 2 43374.117 119476.16 81425.14 NA NA NA NA 53658.844 98804.80 73007.11 NA NA NA NA 0.8083312 1.209214 1.115304 3 585562.724 1296530.34 941046.53 NA NA NA NA 715547.922 1001344.20 838032.04 NA NA NA NA 0.8183417 1.294790 1.122924 4 3866.547 23511.30 13688.92 NA NA NA NA 3422.172 11541.89 6902.05 NA NA NA NA 1.1298517 2.037041 1.983313 </code></pre> <p>If you want the columns for the selection criterion in front of your dataframes, as in your example, you can use:</p> <pre><code>c(lapply(cols, function(x)subset(tbl_comp[,c(cols, setdiff(colnames(tbl_comp), cols))], eval(parse(text=x))&lt;1)), lapply(cols, function(x)subset(tbl_comp[,c(cols, setdiff(colnames(tbl_comp), cols))], eval(parse(text=x))&gt;1))) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload