Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11165 > unrolled thread

Re: Data Format

Started byBill Rowe <readnews@sbcglobal.net>
First post2012-08-02 08:50 +0000
Last post2012-08-02 08:50 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Data Format Bill Rowe <readnews@sbcglobal.net> - 2012-08-02 08:50 +0000

#11165 — Re: Data Format

FromBill Rowe <readnews@sbcglobal.net>
Date2012-08-02 08:50 +0000
SubjectRe: Data Format
Message-ID<jvdf0l$c29$1@smc.vnet.net>
On 8/1/12 at 4:58 AM, nkormanik@gmail.com (Nicholas Kormanik) 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?

simply assign the results of the replacement rule to a variable, i.e.,

In[5]:= c1 = "C1" /. list;
Mean[c1]

Out[6]= 5.

Here, I have intentionally used lower case for the first letter
of the variable name which ensures my name cannot conflict with
any built-in symbols.

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web