SetWeight question

David McFarlane mcfarla9 at msu.edu
Wed Dec 10 18:35:20 UTC 2008


Andrée-Ann,

Nicole Anderson wrote:
> Try adding this after your code (should be ok after all the changes)
> 
> StudyOne.Reset

And while you are at it, you can probably also skip all the If-Thens and 
simplify the whole thing to something like

For i = 1 to StudyOne.Size
     StudyOne.SetWeight i, StudyOne.GetAttrib(i, "Cond")
Next i
StudyOne.Reset

-- David McFarlane, Professional Faultfinder


> andreeann Cyr wrote:
>> Hi All,
>>
>> I have a question about how to set the value of weights in a list.
>>
>> The program initially reads into a text file and I want the weight 
>> value to change to correspond to a value in another column (i.e. 
>> "Cond" in this case).
>>
>> Right now, I have the following code (StudyOne is my list):
>>
>> If   StudyOne.GetAttrib(i, "Cond") = "1" then
>>     StudyOne.SetWeight i, 1
>> End if
>>
>> If   StudyOne.GetAttrib(i, "Cond") = "2" then
>>     StudyOne.SetWeight i, 2
>> End if
>>
>> And so forth....
>>
>> And it's not working! The weight values remain at 1. Any suggestions?
>>
>> Thanks in advance :)
>>
>> Andrée-Ann


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list