Re: [R] Grep with wildcards across multiple columns

2013-03-15 Thread Bush, Daniel P. DPI
t(intersect(grep(par.fund, df$fund), grep(par.func, df$func)), grep(par.obj, df$obj)), ], .(code, year), summarize, amount = sum(amount)) Thanks for your ideas! DB Daniel Bush | School Finance Consultant School Financial S

[R] Grep with wildcards across multiple columns

2013-03-14 Thread Bush, Daniel P. DPI
I have a fairly large data set with six variables set up like the following dummy: # Create fake data df <- data.frame(code = c(rep(1001, 8), rep(1002, 8)), year = rep(c(rep(2011, 4), rep(2012, 4)), 2), fund = rep(c("10E", "10E", "10E", "27E"), 4),

Re: [R] Error in Sweave but not underlying script

2012-11-19 Thread Bush, Daniel P. DPI
] Sent: Friday, November 16, 2012 1:51 PM To: Bush, Daniel P. DPI Cc: 'r-help@r-project.org' Subject: Re: [R] Error in Sweave but not underlying script On 16/11/2012 2:26 PM, Bush, Daniel P. DPI wrote: > I'm trying to use Sweave to create a dynamic report of a variety of financial

[R] Error in Sweave but not underlying script

2012-11-16 Thread Bush, Daniel P. DPI
I'm trying to use Sweave to create a dynamic report of a variety of financial data checks. I have an .R code file to pull the data from a database, manipulate and filter it, and create individual data frames for each test. My Sweave .RNW document then calls that file with source() to generate th

[R] ggplot2: Legend title

2012-04-20 Thread Bush, Daniel P. DPI
I'm designing a set of plots intended for a general audience; here's the code for one of them, using the latest version of ggplot: plot.enr.all <- ggplot(data=df1, aes(x=HS_GRAD_YEAR, y=Percentage, group=Enrolled_by, color=Enrolled_by, shape=Enrolled_by, fill=Enrolled_by)