Displaying 1 result from an estimated 1 matches for "plotprob".
Did you mean:
hotprob
2012 May 11
1
Strange "Error: subscript out of bounds"
Dear all,
I am trying to write a function for visualizing ordinal model results.
The function works fine with some values, but then I get "Error:
subscript out of bounds" even there the index should be pointing a legal
item. Code is below as well as the example of failure:
plotProb <- function(pre.mat, parts, split, titles, xlab="") {
par(mfrow = split)
n <- 1
for(k in parts) {
print("debug")
print(k)
print(n)
print(length(pre.mat))
print(pred.mat[k,])
print(titles[n])
plot(1:5, pred.mat[k,], lty=2, type="l", ylim=c(0,1), x...