search for: thisdata

Displaying 3 results from an estimated 3 matches for "thisdata".

2011 Mar 31
2
That dreaded floating point trap
Hi, I had a piece of code which looped over a decimal vector like this: for( i in where ){ thisdata <- subset(herde, herde$mlr >= i) # do stuff with thisdata.. } 'where' is a vector like seq(-1, 1, by=0.1) My problem was: 'nrow(thisdata)' in loop repetition 0.4 was different if 'where' was seq(-1, 1, by=0.1) than when 'where' was seq(-0.8, 1, by=0.1) It...
2012 Feb 16
2
Problem building up ggplot graph in a loop.
Folks, I want to automate some graphing using ggplot. Here is my code graphChargeOffs2<-function(coffs) { ggplot(coffs, aes(levels)) dataNames<-names(coffs)[!names(coffs) == "levels"] for(i in dataNames) { thisData<-coffs[[i]] last_plot() + geom_line(aes(y = thisData, colour = i)) } last_plot() + ylab("Total Chargeoffs") } coffs is a data.frame. I get the following error: Error in eval(expr, envir, enclos) : object 'thisData' not found As little as I know about environments in...
2012 Jul 22
1
Lattice/"panel.bwplot" and Gviz: Boxplot question
Hi, I was using Gviz package to create a boxplot. I understand that Gviz uses "panel.bwplot" to create the boxplot. Is there any way that I can remove the dashed line surrounding each pair of boxplots? Here is some sample code: ############# library(Gviz) thisdata <- matrix(sample(1:100,60),nrow=10,ncol=6) positions <- sample(1:100,6) limit1 <- min(positions)-1 limit2 <- max(positions)+1 colnames(thisdata) <- positions dgroups <- c(rep('sample1',6),rep('sample2',4)) chr <- "chr1" d4x <- DataTrack(start=posi...