[R] Installing RODBC
I tried installing RODBC but got the following message: Checks were yes until the following checking sql.h usability... no checking sql.h presence... no checking for sql.h... no checking sqlext.h usability... no checking sqlext.h presence... no checking for sqlext.h... no configure: error: "ODBC headers sql.h and sqlext.h not found" ERROR: configuration failed for package ‘RODBC’ * removing ‘/home/bill/R/x86_64-pc-linux-gnu-library/3.1/RODBC’ Apparently RODBC was there when R was installed, but library() shows it is not there now, although the DBI package is. Best ideas for installing RODBC? Bill __ 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.
[R] lattice different colors in different areas
In making grid graphs, one can make the background semi-transparent with a line like grid.rect(gp=gpar(lty=0, fill=rgb(.5, .5, 0,. 25))) and then make the area where points and lines are plotted white with lines like pushViewport(plotViewport(c(5,4,3,1))) pushViewport(dataViewport(year, m, name="plotRegion")) grid.rect(gp=gpar(fill="white")) (The area where the labels, title, legend, etc. are remains semi-transparent.) I need to use the features of lattice for some graphs but want to keep the same color theme. In lattice, the background can be changed with the lines below, but it makes the entire graph this color. bsettings=trellis.par.get("background") bsettings$col=rgb(.5, .5, 0, .25) trellis.par.set("background", bsettings) How do I now change just the plot region back to white? Thanks. __ 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.
[R] simple graphing question
I have what should be a simple question but I've been unable to solve it in a reasonable length of time. For example with data like > ge product response scenario 1wine5 base 2 steel 10 base 3 sugar4 base 4wine -10 policy 5 steel1 policy 6 sugar -20 policy (In reality there would be similar groups of data of various sizes). I would like to make dotplots with product on the left axis, x's for policy and o's for base scenario, say in red and blue. I would like to have horizontal lines from the product names across thru the x's and o's to the other side. Because positive or negative responses are important, I would like to have a vertical red line top to bottom at 0. I've experimented with dot.line, add.line to put in horizontal lines but was unsuccessful. Although the following code puts a red vertical line in, it is at the plot's left border. gedot <- function() { trellis.par.set(list(fontsize=list(text=12), dot.symbol=list(pch=c(1,4), col=c("blue","red")) )) print(dotplot(product ~ response, groups = scenario, pch=c(1,4), xlab="", ylab=NULL)) panel.abline(v=0, col="red", reference=FALSE) } Help please. __ 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.