Hi, I want to do subscripted assignment of grid units, but I cannot find a straightforward way of doing it (and I have searched all forums and places I could think about, including Paul Murrell,s page). The usual subscripted assignment operator does replace the numeric part, but does not update the attributes. Before I write my own function, manipulating attributes etc I would like to know if such a function already exists (I am sure it does). What I want to do can be reflected as in the code below:
testUnit <- unit(1, "lines") > testUnit [1] 1lines > testUnits <- rep(testUnit, 5) > testUnits [1] 1lines 1lines 1lines 1lines 1lines > testUnit2 <- unit(0.5, "grobwidth", textGrob("Testing")) > testUnits[3] <- testUnit2 > testUnits [1] 1lines 1lines 0.5lines 1lines 1lines I would like to obtain [1] 1lines 1lines 0.5grobwidth 1lines 1lines Any tips? Thanks, Pedro -- View this message in context: http://www.nabble.com/subscripted-assignment-of-grid-units-tp24371172p24371172.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.