Displaying 1 result from an estimated 1 matches for "ratioinput".
2007 Sep 27
1
to overcome error while computing sd for each subset of data (PR#9931)
...erogeneous means number of rows in each subset are
different.These all subsets are in one dataset situated one by one.
i have used aggregate command to calculate mean for each subset.
But same command for calculating sd gives error
see the following program,
> a<-read.table("c:/mri/data/ratioinput.txt",header=T, na.strings =
"NA",fill=TRUE)
> dim(a)
[1] 32515 27
> BusinessRisk<-a[,16]/(a[,26]/a[,27])
> a1<-a[,1:3]
> a2<-cbind(a1,BusinessRisk)
> c1<-aggregate(BusinessRisk,list(a2[,1]),mean)
> names(a)
[1] "Co_Code" "Co_Na...