search for: ilai

Displaying 20 results from an estimated 29 matches for "ilai".

Did you mean: iai
2012 Mar 01
2
How to colorize the panel backgrounds of pairs()?
Dear expeRts, I would like to colorize the backgrounds of a pairs plot according to the respective panel number. Here is what I tried (without success): count <- 0 mypanel <- function(x, y, ...){ count <<- count+1 bg. <- if(count %in% c(1,4,9,12)) "#FDFF65" else NA points(x, y, cex=0.5, bg=bg) } U <- matrix(runif(4*500), ncol=4) pairs(U, panel=mypanel) I
2012 Sep 28
2
changing outlier shapes of boxplots using lattice
Hello This is Elaine. I am using package lattice to generate boxplots. Using Richard's code, the display was almost perfect except the outlier shape. Based on the following code, the outliers are vertical lines. However, I want the outliers to be empty circles. Please kindly help how to modify the code to change the outlier shapes. Thank you. code package (lattice) dataN <-
2012 Feb 23
2
help with winbugs glm
Hi, I am running a model with count data and one categorical predictor (simple model for me to understand it fully), I did in R a glm like this: glm(Recruitment~Depth, family=poisson). I get the coefficientes and confidence intervals and all is ok. But then I want to do the same model with Bayesian stats, here is my code: model { for (i in 1:232) { Recruitment[i]~dpois(lambda[i])
2013 Feb 08
3
Border width on symbols plotted with the lattice package
Dear list members, I can't figure out how get 'xyplot' or 'dotplot' in the 'lattice' package to respect the 'lwd' value for specifying the border with for *symbols* (for lines it works fine). Example: ----- # Base graphics works fine (gives a 'fat? circle) plot(5, cex=10, pch=21, lwd=10) # But 'xyplot' or 'dotplot' doesn't
2012 Jun 26
3
plotting two histograms on one plot with hist function
I would like to plot two data sets (frequency (y-axis) of mean values for 0-1(x=axis)) on a single histogram for comparison. The hist() only allow the overlay of two histograms, and although barplot() allows beside=TRUE, it does not show frequency values (like hist) but rather all of the values. Is there any way that I can use the hist() to plot two data sets similar to the barplot(). Any help or
2013 Jan 26
2
different legends in lattice panels
Hi listers, I want to make lattice plots xyplots with the indication of legends inside each panel with only the points and the lines actually ploted inside each given panel according to the group(ing) factor. The code below shows what I have achieved so far and I hope will make clear what I want to have. It seems to me that my solution is a very "dirty hack" and there certainly is
2013 Jan 29
2
export figure by pdf command
Dear R mailing listers, After plotting, I wanna save it as file in pdf format using pdf("name.pdf") command. It failed, but I can do it by GUI operation (file-save as-pdf). e.g. x11() hist(x, breaks = 50, probability = FALSE) pdf("hist.pdf") [[alternative HTML version deleted]]
2012 Feb 07
6
Setting up infile for R CMD BATCH
Suppose I create an R program called myTest.R with only one line like the following: type <- as.integer(readline("input type (1: type1; 2: type2)? ")) Then I'd like to run myTest.R in batch mode by constructing an input file called answers.R with the following: source("myTest.R") 1 When I ran the following at the terminal: R CMD BATCH answer.R output.Rout it failed
2012 Jun 16
2
aligning axis labels in a colorkey from levelplot
R does a great job with the fine details regarding plots. e.g in the following: library(lattice) y <- -4:4/10 xyplot(y~1, las=1) the y axis is labelled with numbers -0.4, -0.2, 0.0, 0.2, 0.4 with the numbers aligned on the decimal point. How do I get the same behaviour in the colorkey of a levelplot? e.g. levelplot(matrix(y,3,3)) the numbers in the colorkey seem left-aligned, and
2012 Feb 09
2
Lattice 3d coordinate transformation
Hello List! I asked this before (with no solution), but maybe this time... I'm trying to project a surface to the XY under a 3d cloud using lattice. I can project contour lines following the code for fig 13.7 in Deepayan Sarkar's "Lattice, Multivariate Data Visualization with R", but it fails when I try to "color them in" using panel.levelplot. ?utilities.3d says there
2012 Feb 13
2
best subset selection on random effects model
Hi, I know leaps() computes the best subset selection for linear model, and the bestglm() computes the best subset selection for generalized linear model. Is there any package for best subset selection on random effects model, or mixed effects model? Thank you so much. Tao [[alternative HTML version deleted]]
2012 Apr 19
1
Fwd: User defined panel functions in lattice
Hi ilai Thank you for your suggestions. I do not know what happened yesterday I must have omitted a few changes out in going from R to email and apologies for the double posting - I had troubles sending it as my ISP gave a message of not being connected for email but was for the web I was trying to...
2012 Jul 13
2
minor axis ticks in trellis graphics?
Dear R users, I need to add minor axis ticks to my graph. In traditional R this is easily achievable by simply adding a second axis with the minor ticks. But how to do that in trellis? I am already out of ideas. Any suggestions will be appreciated. Best regards, Martin ----------------------------------------------------------------- ?????????? ??????????? ? ?????? ?? ??????????
2012 Feb 15
2
[newbie] separating plot output from debug output
I'm attempting to refactor an R script that does a lot of plotting, among other things. Ideally I'd like to do something like setup # does pdf(...) for each part of input { plot(process(part)) } cleanup # does dev.off() but have problems: 1 I'm plotting to PDF, so everytime I dev.off() creates a new file, and I want everything in one file (as does my boss :-) 2 I'm
2012 Nov 28
2
Error message R2Jags
Hi, I'm trying to generate a GLMM for Y following a negative binomial distribution. The first step I'm taking as a beginner in the use of R2Jags is to generate a GLM for Y following a Poisson distribution (I heard it's good in order to get used to the coding language), so here I am and here I face the first error message for which I can't find any mistake of spelling. Could you
2012 Feb 23
5
cor() on sets of vectors
suppose I have two sets of vectors: x1,x2,...,xN and y1,y2,...,yN. I want N correlations: cor(x1,y1), cor(x2,y2), ..., cor(xN,yN). my sets of vectors are arranged as data frames x & y (vector=column): x <- data.frame(a=rnorm(10),b=rnorm(10),c=rnorm(10)) y <- data.frame(d=rnorm(10),e=rnorm(10),f=rnorm(10)) cor(x,y) returns a _matrix_ of all pairwise correlations: cor(x,y)
2012 Feb 20
1
Time taken to process a file after a socket connection was made
Hello R people, I have created a '.csv' file of 100 rows by 20 columns whose each cell contains a random numbers between 0 & 1, thru a Java program. Once that is created a signal (just a letter) is send to the port of a socket connection at "localhost", which was earlier started by an "R" session. Now the "R" reads the '.csv' file into a data
2012 Apr 03
5
Import from excel button in R-command
Hello I have been searching for almost 2 hours for a certain plug-in/package, so im making this thread as i hope you can help me find it. I had my first lesson in "Statistics in use" today, and when we worked on the school computers, we could do this to import data from excel: Data > Import Data > Import from excel or "something else" Now i downloaded it for my
2012 Apr 19
5
User defined panel functions in lattice
Hi I have a problem with passing line and symbol parameters to user defined panel functions I had a look at the archives and created a panel function on what was shown and on panel.loess. I could not to get panel.locfit to work for what I intend it for. There is another layer to work with before success as lp() is called from locfit. xx <- structure(list(Farm = c("A",
2012 Feb 06
5
I bet apply has a solution
Hi all For the data below, I would like to return a logical value indicating differences in the data. #Create data Data..<-data.frame(a=rep(1,10),b=c(rep(1,9),2),c=c(rep(1,8),2,2)) a b c 1 1 1 1 2 1 1 1 3 1 1 1 4 1 1 1 5 1 1 1 6 1 1 1 7 1 1 1 8 1 1 1 9 1 1 2 10 1 2 2 So what I want is to return logical value telling me if all the values are the same. So the result would be a b