search for: pf_zbw

Displaying 2 results from an estimated 2 matches for "pf_zbw".

Did you mean: pf_w
2010 Jan 11
1
Help with Order
..., header=TRUE),rnd = round2) if (round2 == (round1 +1)) z=data.frame(merge(x,y,all=TRUE)) z=data.frame(merge(y,z,all=TRUE)) } } ordered = order(z$lab_id) results = z[ordered,] res = data.frame( lab=results[,"lab_id"],bw=results[,"ZBW"],wi=results[,"ZWI"],pf_zbw=0,pf_zwi=0,r = results[,"rnd"]) # # Establish no of samples recorded nsmpls = length(res[,c("lab")]) # Evaluate Z_scores for Between Lab Results for ( i in 1 : nsmpls) { if (res[i,"bw"] > 3 | res[i,"bw"] < -3) res[i,"pf_zbw"]=1 } # Evaluat...
2010 Jan 17
1
Help using Cast (Text) Version
...to count the no of occurances in a column of a data frame and there is missing data identifed by NA. I am able to melt and cast the data correctly as well as sum the occurances using margins and sum. Here are the melt and cast commands bw = melt(res, id=c("lab","r"), "pf_zbw") b = cast(bw, lab ~ r, sum, margins = T) Sample Data (before using sum and margins) lab 1 2 3 4 5 6 1 4er66 1 NA 1 0 NA 0 2 4gcyi 0 0 1 0 0 0 3 5d3hh 0 0 0 NA 0 0 4 5d3wt 0 0 0 0 0 0 . . lines deleted to save space . 69 v3st5 NA NA 1 NA NA NA 70 a22g5 NA...