r - I getting an incorrect number of dimensions error while trying to calculate the standard deviation of various rows of a csv file -


i have .csv file standard deviations need calculate, contains information 4 controls , 4 test samples. file contains on 5000 rows data points @ different times. data not of same length, have truncated file 1st 2500 rows such there no n/a values. code follows:

#row means library(genefilter) delta = read.csv("/filename.csv", nrows = 2500)  mn1 = rowmeans(delta[,1:4]) # controls mn2 = rowmeans(delta[,5:8]) # test  s1 = rowsds(mn1[,1:4]) # controls s2 = rowsds(mn2[,5:8]) # test 

the program calculates mean perfectly, gives me error when trying calculate standard deviation:

error in mn1[, 1:4] : incorrect number of dimensions 

help on going wrong , how correct appreciated.

as suggested, here file: .csv file

i think problem calculate std. deviation mn1 , mn2 - not data. should work (couldn't install genefilter package):

s1 = rowsds(delta[,1:4]) # controls s2 = rowsds(delta[,5:8]) # test


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -