Re: Data Format
- To: mathgroup at smc.vnet.net
- Subject: [mg127517] Re: Data Format
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Thu, 2 Aug 2012 04:46:01 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <20120801085851.96FAE6864@smc.vnet.net>
list = { "C1" -> {5.`, 4.`, 7.`, 3.`, 6.`, 6.`, 7.`, 1.`, 5.`, 6.`}, "C2" -> {2.`, 5.`, 6.`, 7.`, 7.`, 1.`, 5.`, 4.`, 7.`, 2.`}}; {C1, C2} = Last /@ list; Mean[C1] 5. Mean /@ {C1, C2} {5., 4.6} Bob Hanlon On Wed, Aug 1, 2012 at 4:58 AM, Nicholas Kormanik <nkormanik at gmail.com> wrote: > > Please consider the following code, which is data imported directly into > Mathematica via a .mtp file (Minitab Portable Worksheet), and then using > list assignment: > > list = {"C1" -> {5.`, 4.`, 7.`, 3.`, 6.`, 6.`, 7.`, 1.`, 5.`, 6.`}, "C2" > -> {2.`, 5.`, 6.`, 7.`, 7.`, 1.`, 5.`, 4.`, 7.`, 2.`}} > > The following two commands work: > > Mean["C1" /. list] > > Mean["C2" /. list] > > However I would prefer to be able to issue the following commands instead: > > Mean[C1] > > Mean[C2] > > How can the code at top be converted so that these simpler commands will > work? > > Thanks. > > Nicholas Kormanik >
- References:
- Data Format
- From: "Nicholas Kormanik" <nkormanik@gmail.com>
- Data Format