Commit ee818b5e authored by panos's avatar panos Committed by Jérome Perrin

Insert the calculation of the meadian value in a data set

parent b836b779
......@@ -55,6 +55,11 @@ class BasicStatisticalMeasures:
rmean = robjects.r['mean'] #Call mean - R function
return rmean(data)[0]
def median (self, data): #Calculate the median value of a data sample
data=robjects.FloatVector(data)
rmedian = robjects.r['median'] #Call median - R function
return rmedian(data)[0]
def var (self, data): #Calculate the variance of a data sample
data=robjects.FloatVector(data)
rvar = robjects.r['var'] #Call variance function - R function
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment