Changeset 9919:8a2a770ef3af in orange for Orange/misc/r.py


Ignore:
Timestamp:
02/07/12 13:16:54 (2 years ago)
Author:
markotoplak
Branch:
default
Message:

data.variable -> feature

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/misc/r.py

    r9671 r9919  
    5050        return na if value.isSpecial() else fn(value) 
    5151     
    52     if attr.var_type == Orange.data.variable.Variable.Continuous: 
     52    if attr.var_type == Orange.feature.Descriptor.Continuous: 
    5353        return robjects.FloatVector([cv(ex[attr], float, NA_Real) for ex in data]) 
    54     elif attr.var_type == Orange.data.variable.Variable.Discrete: 
     54    elif attr.var_type == Orange.feature.Descriptor.Discrete: 
    5555        return robjects.r("factor")(robjects.StrVector([cv(ex[attr], str, NA_Char) for ex in data])) 
    56     elif attr.var_type == Orange.data.variable.Variable.String: 
     56    elif attr.var_type == Orange.feature.Descriptor.String: 
    5757        return robjects.StrVector([cv(ex[attr], str, NA_Char) for ex in data]) 
    5858    else: 
     
    6666    if not variables: 
    6767        variables = [ attr for attr in data.domain.variables if attr.var_type in \ 
    68                  [ Orange.data.variable.Variable.Continuous,  
    69                    Orange.data.variable.Variable.Discrete,  
    70                    Orange.data.variable.Variable.String ] ] 
     68                 [ Orange.feature.Descriptor.Continuous,  
     69                   Orange.feature.Descriptor.Discrete,  
     70                   Orange.feature.Descriptor.String ] ] 
    7171            
    7272    odata = [] 
Note: See TracChangeset for help on using the changeset viewer.