ok, used the lapply function and now the "Years" column is the numeric type. However, I still get the same error as above. Replacing either "kent[1,1]" or "kent[dimkent[1],1]" with a number, gives me the same error. If both terms are replaced with a number, then it does not produce an error. It then runs, and the number "1" is the only number on the bottom axis. However after the next line:
if(kent[dimkent[1],2]%%20) axis.ticks<-axis.ticks[-length(axis.ticks)] I get this error: "Error in kent[dimkent[1], 2]%%20 : non-numeric argument to binary operator" -- View this message in context: http://n4.nabble.com/Barplot-axis-titles-tp1476789p1477994.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.