May be this helps: mymatrix<- matrix (1:5, nrow=5, ncol=columnas, byrow=TRUE, dimnames=(list(myrownames, c(1,2,3,4,5)))) #Error in matrix(1:5, nrow = 5, ncol = columnas, byrow = TRUE, dimnames = (list(myrownames,? : ?# object 'columnas' not found myrownames[which.max(nchar(myrownames))] #[1] "Ciencias Sociales y Jur?dicas" nchar(myrownames)[which.max(nchar(myrownames))] #[1] 29 A.K.
Hello,
I want to modify margin options in a barplot into a loop. I have, for example, a matrix like this:
myrownames <- c("Arte y Humanidades","Ciencias Sociales y
Jur?dicas", "Ciencias de la Salud","Ciencias", "Ingenier?as y arquitectura")
mymatrix<- matrix (1:5, nrow=5, ncol=columnas, byrow=TRUE, dimnames=(list(myrownames, c(1,2,3,4,5)))) my_strings_length <- nchar(rownames(mymatrix)) [1] 18 29 20 ?8 26 I want to find automatically the highest ?value in my_strings_length, i.e 29. ?how can I do it? many thanks, -- ================================== Ram?n Ovelar Campus Virtual Birtuala UPV/EHU Tel: (34) 94 601 3407 http://campusvirtual.ehu.es University of the Basque Country