Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"subscript out of bounds" error in R #4

Open
alexvguzman opened this issue Apr 8, 2021 · 0 comments
Open

"subscript out of bounds" error in R #4

alexvguzman opened this issue Apr 8, 2021 · 0 comments

Comments

@alexvguzman
Copy link

Hi,

I created an object that contains a reordering of the columns to the order I wanted them to go. I am trying to plot and indexing a file to my new ordering but am getting the following error: "subscript out of bounds." Could someone help me understand what I am missing here?

newOrder<-c("23","24","25","26","15","16","17","18","19","20","21","22","9","10","11","12","6","7","8","1","2","3","4","5","13","14","27", "28","29","30","31","32","33","34","58","59","47","40","41","42","74","75","65","43","48","49","50","51","52","53","54","55","56","57", "67","68","69","70","71","72","73","35","36","37","38","39","44","45","46","60","61","62","63","64","66","76","77","78","79","80","81", "82","83","84","85","86","87","97","98","99","100","101","102","103","104","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","88","89","90","91","92","93","94","95","96","105")

X11(w=8,h=6)
plot("k2_barplot",width=15, height=6.5)
colors2 <- c("gold", "darkblue")
barplot(t.medians2[,newOrder], col = colors2, beside = FALSE, names.arg = names, las = 2, ylab = "k = 2", yaxt = "n",cex.names = 0.7)
axis(2, at = c(0, 0.5, 1.0), las = 1, lwd = 2)

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant