similar to: not working yet: Re: lattice overlay

Displaying 20 results from an estimated 10000 matches similar to: "not working yet: Re: lattice overlay"

2011 Jul 27
1
lattice overlay
Dear experts: I want to overlay lattice scatter plot: I do not know why the following code is not plotting subscripts ! Sorry if this question is too simple: require(lattice) xyplot(Sepal.Length ~ Sepal.Width | Species , data= iris, panel= function(x, y, subscripts) { panel.xyplot(x, y, pch=16, col = "green4", ylim = c(0, 10)) panel.lmline(x, y, lty=4, col = "green4")
2007 Apr 20
1
xyplot: Combining 'subscripts' and 'allow.multiple=T'
Dear all, Consider this plot xyplot(Sepal.Length + Sepal.Width ~ Petal.Length | Species, data = iris, allow.multiple=T, outer=F, panel = function(x,y,...) { panel.xyplot(x,y,...) } ) I want to *add* some things to each panel and what I want to add involves using the data for each panel, so I try to take this subset of data out with subscripts:
2006 May 31
2
a problem 'cor' function
Hi list, One of my co-workers found this problem with 'cor' in his code and I confirm it too (see below). He's using R 2.2.1 under Win 2K and I'm using R 2.3.0 under Win XP. =========================================== > R.Version() $platform [1] "i386-pc-mingw32" $arch [1] "i386" $os [1] "mingw32" $system [1] "i386, mingw32" $status
2008 Oct 13
2
split data, but ensure each level of the factor is represented
Hello, I'll use part of the iris dataset for an example of what I want to do. > data(iris) > iris<-iris[1:10,1:4] > iris Sepal.Length Sepal.Width Petal.Length Petal.Width 1 5.1 3.5 1.4 0.2 2 4.9 3.0 1.4 0.2 3 4.7 3.2 1.3 0.2 4 4.6 3.1 1.5
2008 Feb 27
2
multiple plots per page using hist and pdf
Hello, I am puzzled by the behavior of hist() when generating multiple plots per page on the pdf device. In the following example two pdf files are generated. The first results in 4 plots on one pdf page as expected. However, the second, which swaps one of the plot() calls for hist(), results in a 4 page pdf with one plot per page. How might I get the histogram with 3 other scatter
2012 Jul 23
1
duplicated() variation that goes both ways to capture all duplicates
Dear all The trouble with the current duplicated() function in is that it can report duplicates while searching fromFirst _or_ fromLast, but not both ways. Often users will want to identify and extract all the copies of the item that has duplicates, not only the duplicates themselves. To take the example from the man page: > data(iris) > iris[duplicated(iris), ] ##duplicates while
2009 Oct 17
1
Easy way to `iris[,-"Petal.Length"]' subsetting?
Dear all What is the easy way to drop a variable by using its name (and not its number)? Example: > data(iris) > head(iris) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2 setosa 3 4.7 3.2 1.3 0.2 setosa 4 4.6 3.1
2007 Mar 22
2
unexpected behavior of trellis calls inside a user-defined function
I am making a battery of levelplots and wireframes for several fitted models. I wrote a function that takes the fitted model object as the sole argument and produces these plots. Various strange behavior ensued, but I have identified one very concrete issue (illustrated below): when my figure-drawing function includes the addition of points/lines to trellis plots, some of the
2012 Jul 31
1
kernlab kpca predict
Hi! The kernlab function kpca() mentions that new observations can be transformed by using predict. Theres also an example in the documentation, but as you can see i am getting an error there (As i do with my own data). I'm not sure whats wrong at the moment. I haven't any predict functions written by myself in the workspace either. I've tested it with using the matrix version and the
2010 Feb 03
1
Calculating subsets "on the fly" with ddply
Hi, [I sent this to the plyr mailing list (late) last night, but it seems to be lost in the moderation queue, so here's a shot to the broadeR community] Apologies in advance for being more verbose than necessary, but I'm not even sure how to ask this question in the context of plyr, so ... here goes. As meaningless as this might be to do with the `iris` data, the spirit of it is what
2010 Jun 09
4
question about "mean"
Hi there: I have a question about generating mean value of a data.frame. Take iris data for example, if I have a data.frame looking like the following: --------------------- Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2
2007 Dec 03
1
cor(data.frame) infelicities
In using cor(data.frame), it is annoying that you have to explicitly filter out non-numeric columns, and when you don't, the error message is misleading: > cor(iris) Error in cor(iris) : missing observations in cov/cor In addition: Warning message: In cor(iris) : NAs introduced by coercion It would be nicer if stats:::cor() did the equivalent *itself* of the following for a data.frame:
2012 Jul 10
3
fill 0-row data.frame with 1 line of NAs
Dear all Is there a simpler method to achieve the following: When I obtain an empty data.frame after subsetting, I need for it to contain one line of NAs. Here's a dummy example: > (.xb <- iris[ iris$Species=='zz', ]) [1] Sepal.Length Sepal.Width Petal.Length Petal.Width Species <0 rows> (or 0-length row.names) > dim(.xb) [1] 0 5 > (.xa <-
2012 Jun 11
1
saving sublist lda object with save.image()
Greetings R experts, I'm having some difficulty recovering lda objects that I've saved within sublists using the save.image() function. I am running a script that exports a variety of different information as a list, included within that list is an lda object. I then take that list and create a list of that with all the different replications I've run. Unfortunately I've been
2008 May 30
1
robust mlm in R?
I'm looking for something in R to fit a multivariate linear model robustly, using an M-estimator or any of the myriad of other robust methods for linear models implemented in robustbase or methods based on MCD or MVE covariance estimation (package rrcov). E.g., one can fit an mlm for the iris data as: iris.mod <- lm(cbind(Sepal.Length, Sepal.Width, Petal.Length, Petal.Width) ~ Species,
2003 Sep 09
2
lattice.xyplot: adding grid lines
Hallo, I'd like to add grid lines to a lattice graph having 2 series of Y data. See these 2 examples: data(iris) [1] xyplot(Sepal.Length + Sepal.Width ~ Petal.Length , data = iris, allow.multiple = TRUE, scales = "same",type="l", ) [2] xyplot(Sepal.Length + Sepal.Width ~ Petal.Length , data = iris, allow.multiple = TRUE, scales =
2007 Jul 25
1
question on using "gl1ce" from "lasso2" package
Hi, I tried several settings by using the "family=gaussian" in "gl1ce", but none of them works. For the case "glm" can work. Here is the error message I got: > glm(Petal.Width~Sepal.Length+Sepal.Width+Petal.Length ,data=iris,family=gaussian()) > gl1ce(Petal.Width~Sepal.Length+Sepal.Width+Petal.Length ,data=iris,family=gaussian()) Error in eval(expr, envir,
2005 Mar 21
1
Convert numeric to class
Dear all, I have a script about iteration classification, like this below data(iris) N <- 5 ir.tr.iter <- vector('list',N) ir.tr <- vector('list',N) for (j in 1:N) { ir.tr[[j]] <- rpart(Species ~., data=iris) ir.tr.iter[j] <- ir.tr[[j]]$frame result <- list(ir.tr=ir.tr, ir.tr.iter=ir.tr.iter) } as.data.frame(as.matrix(ir.tr.iter))
2012 Jul 12
1
Results from mixed linear models
Dear list, I'm quite confused when interpreting results from a mixed linear model. For example, working on Iris data frame, I want to know the effect of species on slope of the model "Petal.Length~Sepal.Length" I write this : data(iris) reg01 <- lm(Petal.Length~Sepal.Length + Sepal.Length:Species, data=iris) summary(reg01) It gives me a summary table with lm for the first
2010 Jul 29
1
where did the column names go to?
I've just tried to merge 2 data sets thinking they would only keep the common columns, but noticed the column count was not adding up. I've then replicated a simple example and got the same thing happening. q1. why doesn't 'b' have a column name? q2. when I merge, why does the new column 'y' have all values as 5.1? Thanks in advance, Mr. confused > a <-