11rppa.serialDilution.summarize <-
22function (data.protein.conc , method = " mean" ,
33 select.columns.sample = c(" SampleName" ),
4- select.columns.A = c(" LysisBuffer " ),
5- select.columns.B = c(" CellLine" ), select.columns.fill = c(" Deposition " ))
4+ select.columns.A = c(" Treatment " ),
5+ select.columns.B = c(" CellLine" ), select.columns.fill = c(" NumberOfCellsSeeded " ))
66{
77 data.protein.conc $ x.err.percent <- data.protein.conc $ x.err / data.protein.conc $ x.weighted.mean
88
@@ -37,12 +37,12 @@ function(data.protein.conc, method="mean",
3737 fillAttribute <- paste(select.columns.fill , collapse = " | " )
3838 }
3939 else {
40- cat(" Fill attribute cannot be empty in the current version, using Depositions per default." )
41- Fill <- data.protein.conc [," Deposition " ]
40+ cat(" Fill attribute cannot be empty in the current version, using NumberOfCellsSeeded per default." )
41+ Fill <- data.protein.conc [," NumberOfCellsSeeded " ]
4242 newColumns <- cbind(newColumns , Fill )
43- fillAttribute <- " Deposition "
43+ fillAttribute <- " NumberOfCellsSeeded "
4444 }
45-
45+
4646 result <- cbind(newColumns , data.protein.conc [,c(" Deposition" , " x.weighted.mean" , " x.err.percent" )])
4747
4848 if (! is.na(select.columns.A ) && ! is.na(select.columns.B ))
@@ -55,7 +55,7 @@ function(data.protein.conc, method="mean",
5555 result <- ddply(result , .(Sample , B , Fill , Deposition ), summarise , x.weighted.mean = mean(x.weighted.mean , na.rm = T ), x.err = sum(x.err.percent ), sem = sqrt(var(x.weighted.mean ,na.rm = TRUE )/ length(na.omit(x.weighted.mean ))))
5656
5757 else result <- ddply(result , .(Sample , Fill , Deposition ), summarise , x.weighted.mean = mean(x.weighted.mean , na.rm = T ), x.err = sum(x.err.percent ), sem = sqrt(var(x.weighted.mean ,na.rm = TRUE )/ length(na.omit(x.weighted.mean ))))
58-
58+
5959 result $ x.err <- result $ x.weighted.mean * result $ x.err
6060
6161 # make sure A, B and sample are factors
0 commit comments