Hi!
I'm new to R and I am trying to use Phenoflow, but I'm running into an error I don't understand. When I try to make the cytometric fingerprint, I get the error "Error in set[, param[pcom[k, ]]] : subscript out of bounds." From what I read in a post in StackOverflow, I can debug by determining which variable is out of bounds. When I did this, I was able to figure out what the values were, but I don't know how to determine the bounds. I'm pretty sure I'm missing something here, but I'm having trouble finding information.
[EDIT] After looking at the StackOverflow post again, from what I understand "i" and "j" are my bounds? So, this would mean that my teller is out of bounds, or would it be other values of 4? Please let me know if I'm misunderstanding this. If it is the case, how can I change or fix this?
This is the StackOverflow post: Subscript out of bounds - general definition and solution?
Any help would be great! Thanks!
summary <- fsApply(x=x100_10mPW_ta,FUN=function(x) apply(x,2,max),use.exprs=TRUE)
max = mean(summary[,1])
mytrans <- function(x) x/max
x100_10mPW_ta <- transform(x100_10mPW_ta,`BL1.H`=mytrans(`BL1.H`),
`BL3.H`=mytrans(`BL3.H`),
`SSC.H`=mytrans(`SSC.H`),
`FSC.H`=mytrans(`FSC.H`))
cp_x100_10mPW <- flowBasis(x100_10mPW_ta, param, nbin=128,
bw=0.01,normalize=function(x) x)
Error in set[, param[pcom[k, ]]] : subscript out of bounds
##Output found using the method from the post:
Selection: 1
Called from: grDevices:::.smoothScatterCalcDensity(rbind(set, c(1, 1), c(0,
0)), nbin, bw)
Browse[1]> ls()
[1] "bw" "fBasis" "fcs" "i" "j" "nbin" "normalize" "p"
[9] "param" "probBin" "saveFcs" "teller"
Browse[1]> 8
[1] 8
Browse[1]> "bw"
[1] "bw"
Browse[1]> bw
[1] 0.01
Browse[1]> fBasis
flowBasis object
Kernel Density Estimation on grid of x
Kernel density bandwith:
bivariate densities for channels
[,1] [,2]
Browse[1]> fcs
A flowSet with 24 experiments.
column names(20): Event Time ... BL3.W BL4.W
Browse[1]> i
[1] 3
Browse[1]> j
[1] 4
Browse[1]> nbin
[1] 128
Browse[1]> normalize
function(x) x
Browse[1]> p
[1] 4
Browse[1]> param
[1] "BL1.H Log" "BL3.H Log" "FSC.H Log" "SSC.H Log"
Browse[1]> probBin
[1] FALSE
Browse[1]> saveFcs
[1] FALSE
Browse[1]> teller
[1] 6
Browse[1]> p <- length(param)
Browse[1]> p
[1] 4