[R] Data extraction
R. Michael Weylandt
michael.weylandt at gmail.com
Wed Mar 28 06:06:09 CEST 2012
? subset
subset(x, (T > 10) & (T < 150), c("T", "QC", "QO", "QO-QC")
Michael
On Tue, Mar 27, 2012 at 8:28 PM, Luisin Galindo, PhD
<luisingalindophd at gmail.com> wrote:
> Dear ReXperts,
>
> I have the below text file output. I need to extract the T, QC, QO, QO-QC
> and WT columns for
> the data between T = 10 and T=150.
>
> Any ideas?
>
> Thanks in advance.
>
> ========================================================================================
> 1 D C ---CAT-- T THETA QC QO
> QO-QC QC/QO WT FSD
> 8 1 0 1.0000E+01 0.0000E+00 9.04506E+02 * 9.20000E+02
> 1.549E+01 0.983 1.00E+00 1.154E-02
> 9 1 0 2.0000E+01 0.0000E+00 8.16327E+02 * 8.00000E+02
> -1.633E+01 1.020 1.00E+00 7.436E-03
> 10 1 0 3.0000E+01 0.0000E+00 7.36745E+02 * 7.50000E+02
> 1.326E+01 0.982 1.00E+00 3.341E-03
> 11 1 0 4.0000E+01 0.0000E+00 6.64921E+02 * 6.30000E+02
> -3.492E+01 1.055 1.00E+00 7.496E-04
> 12 1 0 5.0000E+01 0.0000E+00 6.00099E+02 * 6.10000E+02
> 9.901E+00 0.984 1.00E+00 4.836E-03
> 13 1 0 6.0000E+01 0.0000E+00 5.41596E+02 * 5.30000E+02
> -1.160E+01 1.022 1.00E+00 8.919E-03
> 14 1 0 7.0000E+01 0.0000E+00 4.88797E+02 * 5.20000E+02
> 3.120E+01 0.940 1.00E+00 1.300E-02
> 15 1 0 9.0000E+01 0.0000E+00 3.98138E+02 * 3.80000E+02
> -1.814E+01 1.048 1.00E+00 2.114E-02
> 16 1 0 1.1000E+02 0.0000E+00 3.24294E+02 * 3.50000E+02
> 2.571E+01 0.927 1.00E+00 2.927E-02
> 17 1 0 1.5000E+02 0.0000E+00 2.15155E+02 * 2.00000E+02
> -1.515E+01 1.076 1.00E+00 4.547E-02
> 1 10 P 1 0.0000E+00 0.0000E+00 9.97795E+00 F 0.00000E+00
> -9.978E+00 * 0.00E+00 1.558E-02
> 2 10 P 2 0.0000E+00 0.0000E+00 9.77063E+04 * 0.00000E+00
> -9.771E+04 * 0.00E+00 2.399E-02
> 3 10 P 3 0.0000E+00 0.0000E+00 1.00221E+03 * 0.00000E+00
> -1.002E+03 * 0.00E+00 1.564E-02
> 4 10 P 4 0.0000E+00 0.0000E+00 1.02348E-01 F 0.00000E+00
> -1.023E-01 * 0.00E+00 2.414E-02
> 5 10 P 5 0.0000E+00 0.0000E+00 9.74909E+01 0.00000E+00
> -9.749E+01 * 0.00E+00 3.948E-02
> 6 10 P 6 0.0000E+00 0.0000E+00 9.52547E+06 * 0.00000E+00
> -9.525E+06 * 0.00E+00 6.323E-02
> 7 10 P 7 0.0000E+00 0.0000E+00 6.75755E+01 0.00000E+00
> -6.758E+01 * 0.00E+00 3.948E-02
> 2 D C ---CAT-- T THETA QC QO
> QO-QC QC/QO WT FSD
> 8 1 0 1.0000E+01 0.0000E+00 8.31072E+02 * 8.50000E+02
> 1.893E+01 0.978 1.00E+00 1.919E-02
> 9 1 0 2.0000E+01 0.0000E+00 6.74355E+02 * 6.30000E+02
> -4.435E+01 1.070 1.00E+00 7.282E-03
> 10 1 0 3.0000E+01 0.0000E+00 5.47189E+02 * 5.80000E+02
> 3.281E+01 0.943 1.00E+00 4.599E-03
> 11 1 0 4.0000E+01 0.0000E+00 4.44004E+02 * 4.10000E+02
> -3.400E+01 1.083 1.00E+00 1.645E-02
> 12 1 0 5.0000E+01 0.0000E+00 3.60277E+02 * 4.00000E+02
> 3.972E+01 0.901 1.00E+00 2.828E-02
> 13 1 0 6.0000E+01 0.0000E+00 2.92339E+02 * 2.70000E+02
> -2.234E+01 1.083 1.00E+00 4.008E-02
> 14 1 0 7.0000E+01 0.0000E+00 2.37211E+02 * 2.60000E+02
> 2.279E+01 0.912 1.00E+00 5.186E-02
> 15 1 0 9.0000E+01 0.0000E+00 1.56183E+02 * 1.45000E+02
> -1.118E+01 1.077 1.00E+00 7.533E-02
> 16 1 0 1.5000E+02 0.0000E+00 4.45791E+01 * 4.20000E+01
> -2.579E+00 1.061 1.00E+00 1.451E-01
> 1 10 P 1 0.0000E+00 0.0000E+00 9.76361E+00 F 0.00000E+00
> -9.764E+00 * 0.00E+00 3.094E-02
> 2 10 P 2 0.0000E+00 0.0000E+00 4.90145E+04 * 0.00000E+00
> -4.901E+04 * 0.00E+00 2.545E-02
> 3 10 P 3 0.0000E+00 0.0000E+00 1.02421E+03 * 0.00000E+00
> -1.024E+03 * 0.00E+00 3.112E-02
> 4 10 P 4 0.0000E+00 0.0000E+00 2.04021E-01 F 0.00000E+00
> -2.040E-01 * 0.00E+00 2.557E-02
> 5 10 P 5 0.0000E+00 0.0000E+00 4.78559E+01 0.00000E+00
> -4.786E+01 * 0.00E+00 5.624E-02
> 6 10 P 6 0.0000E+00 0.0000E+00 2.34563E+06 * 0.00000E+00
> -2.346E+06 * 0.00E+00 8.142E-02
> 7 10 P 7 0.0000E+00 0.0000E+00 3.31711E+01 0.00000E+00
> -3.317E+01 * 0.00E+00 5.624E-02
> --
> Luisin Galindo, PhD
> Director, Departamento de Medicina Matematica
> Centro de Estudios Avansados en
> Simulacion, Analysis, y Modelacion
> Puerto Castilla, Spanish Honduras
> Centro America
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list