search for: withnames

Displaying 2 results from an estimated 2 matches for "withnames".

Did you mean: pathnames
2012 Aug 18
5
Quiz: How to get a "named column" from a data frame
Today, I was looking for an elegant (and efficient) way to get a named (atomic) vector by selecting one column of a data frame. Of course, the vector names must be the rownames of the data frame. Ok, here is the quiz, I know one quite "cute"/"slick" answer, but was wondering if there are obvious better ones, and also if this should not become more idiomatic (hence
2011 Jul 08
1
Referencing a vector of data labels in ggplot function
...#39;) col1 <- c('#ec421e', '#f7bd2e','#ec421e', '#f7bd2e') #If I use the line below and explicitly place plines, pTitle and col1 in the appropriate places #it will work fine. I want to use the line as written without the hashmark. #simple <- function(dframe){ withNames <- function(dframe, lineNames, plotName, colors){ p <- ggplot(dframe, aes(date, value, group = factor, color = factor)) p2 <- p + geom_line(size = 1) # + opts(title = plotName) p2 <- p2 + facet_grid(Facet~., scales = 'free') + # p2 <- p2 + geom_text(data = df...