Displaying 20 results from an estimated 6000 matches similar to: "lattice function splom"
2007 Feb 14
3
Putting splom in a function
Hello R list,
I have a little problem with splom. I'd like to wrap it in a
function, for example:
multi.scatterplot <- function(data,groups,cols,colors) {
splom(~data[,cols], groups = as.symbol(groups), data = data, panel
= panel.superpose, col=colors)
}
and then call it like in
multi.scatterplot(iris,"Species",1:4,c("green","blue","red"))
2010 Nov 11
1
change axis labels and text size in "splom"
Hi everyone:
I'm using "splom" to draw scatterplot matrix. I'm wondering how can I change the axis labels to c(1,10,100,1000,...)
instead of c(1,2,3,...), and also how can I change the text size (for labels)?
Thanks a lot!
xcui
2011 Jan 20
2
circular reference lines in splom
Hello everyone,
I'm stumped. I'd like to create a scatterplot matrix with circular
reference lines. Here is an example in 2d:
library(ellipse)
set.seed(1)
dat <- matrix(rnorm(300), ncol = 3)
colnames(dat) <- c("X1", "X2", "X3")
dat <- as.data.frame(dat)
grps <- factor(rep(letters[1:4], 25))
panel.circ <- function(x, y, ...)
{
circ1
2007 Oct 02
1
splom pairs and groups argument
Hello,
I'm trying to pull off a certain graph using splom, and can't quite get my panel functions right.
Basically, the equivalent using pairs would be something like this (using iris data set as an example):
panel.corval <- function(x, y, digits=2, prefix="", cex.cor,col,pch)
{
usr <- par("usr"); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
2003 Oct 12
6
Rd problems
Hola!
I have the following in a .Rd file:
\eqn{\mbox{coef} = c(\mbox{coef}[1],\ldots, \mbox{coef}[n]) }
{coef = c(coef[1], coef[2], \dots, coef[n])}
However, both arguments come out in the latex file!
Whats happening?
Kjetil Halvorsen
2007 Aug 01
1
Splom custom superpanels
I thought one nice addition to a splom figure would be to have the
scatterplots in the upper triangle and a color-coordinated
correlation matrix on the bottom. So I tried my hand at customizing
panel.pairs(), and was rebuffed. Many times. Four hours of
fruitless debugging later, I turn to you for help:
panel.pairs(z=teststatfull[,6:12], pscales=0,
panel.subscripts=FALSE, subscripts=,
2004 Mar 09
1
bug(?) in chisq.test
This is a message for whoever maintains "chisq.test": For an
outcome more extreme than 2000 simulations, a Monte Carlo p-value of "<
2.2e-16" was printed. Ripley said the proper p-value for such cases
should be 1/(B+1) = 1/2001. This can be easily fixed by adding
"if(PVAL==0)PVAL <- 1/(B+1)" right after the following line in the code
for chisq.test (in R
1998 Jan 23
0
S-Plus graphs to LaTeX picture commands
Well, R ( http://lib.stat.cmu.edu/R/CRAN/ )
has a pictex(..) driver.
>>>>> "kjetil" == kjetil halvorsen <kjetil@caoba.entelnet.bo> writes:
kjetil> Is there any possibility to write code which ``translates''
kjetil> from splus graphics to latex picture commands? Or somebody has
kjetil> written something like that?
kjetil> I did
2003 Jul 17
2
Minor nuisance with rw1071
Hola!
Starting with rw1071, just after starting Rgui the scope is not with
Rconsole, but some other place. This means I have to do a mouse click
in the Rconsole before starting to write the first command. Since I
always forget this, I end up writing the first command twice.
This is of course only a minor nuisance, but why is focus no longer
set to Rconsole window when start-up?
This is on
2005 Oct 04
1
pdf plotting of splom
Hi,
The following code produces a plot on X11:
splom(~iris[1:4], groups = Species, data = iris,
panel = panel.superpose,
key = list(title = "Three Varieties of Iris",
columns = 3,
points = list(pch = super.sym$pch[1:3],
col = super.sym$col[1:3]),
text = list(c("Setosa", "Versicolor", "Virginica"))))
However,
2003 Jun 07
1
table( , exclude=NULL) for factor objects
The NEWS file for R-1.7.0 says:
table() now allows exclude= with factor arguments (requested by
Michael Friendly).
But in a recent R-1.7.1beta:
> test <- c(1,2,3,4,5,1,2,3,4,5,NA,NA,1,2,3,4,5)
> table(test)
test
1 2 3 4 5
3 3 3 3 3
> table(test, exclude=NULL)
test
1 2 3 4 5 <NA>
3 3 3 3 3 2
> table( as.factor(test), exclude=NULL)
1 2
2003 Oct 20
1
bug in fisher test---p-value cannot be Inf (PR#4688)
I just found a bug in fisher.test(). This is rw1080, on windows XP.
A p-value can certainly not be Inf, but:
> religion
Costumbres rel orig
Religion Si Algunas veces Nunca
católica 2121 4700 6234
prot/evan 100 216 2461
otra C 27 67 502
otra 0 0 14
> fisher.test(religion, workspace=2000000)
2007 Aug 30
2
Need help putting histograms on the diagonal of a splom plot
Hello,
I am in need of help in putting histograms on the diagonal of a plot
produced with splom().
The plot matrix I am trying to produce is to have standard scatterplots
in the upper-left triangle, contour plots in the lower-right triangle,
and histograms on the diagonal. I have a function that does the first
two, but the histograms on the diagonal has been beyond my ability.
Here is my
2003 Sep 02
2
identify with image
Hola!
I will want to identify pixels in an image with the mouse, for
so getting the image data from the matrix(es), for use in subsequent
discriminant analysis. But the following bombs R:
(windows XP, rw1071)
> str(baboon)
list()
- attr(*, "size")= int [1:2] 512 512
- attr(*, "cellres")= num [1:2] 1 1
- attr(*, "bbox")= num [1:4] 0 0 512 512
- attr(*,
2004 Apr 21
2
segfault in approx() (PR#6809)
This is R1.9.0, windows XP
I run across the following:
It is admittedly silly, but it shouldn't segfault:
test <- list(y=1:100, x=rep(NaN, 100))
approx(test, xout=rep(NaN, 10))
Bombs!
Kjetil Halvorsen
2012 Dec 11
1
Focus on a sub-panel of a splom with trellis.focs() -- return coordinate of sub-panel, or names of variables therein
Hi,
I'd like to be able to generate a splom plot in R and then use my mouse to click on one of the sub-panels (panel.pairs, specifically) and have R return either the coordinates of that sub-panel, or even better, the names of the corresponding variables plotted in that sub-panel.
Here's an example to work with:
> library(lattice)
> splom(~iris[1:4], groups = Species, data = iris,
2003 Aug 16
4
unclass
Have I been sleeping in class?
rw1071 from CRAN, windows XP
incidencia is made by a call to tapply
> class(incidencia)
[1] "array"
> incidencia <- unclass(incidencia)
> class(incidencia)
[1] "array"
Kjetil Halvorsen
2003 Oct 12
1
Rd problems --- followup
I should'nt have sent the last mail so fast.
Same problem with
\eqn{u_j = a_j + b x + c x^2, \quad j=1, \ldots, r-1}
{u[j] = a[j] + b*x + c*x^2 j = 1,\dots,r-1}
I thought the problem in the first case could have to do with
the use use of \mbox{} (with the braces) within the arguments
of \eqn, but here there are none braces in the arguments of \eqn{}{}.
Another case giving the
2004 Apr 16
1
Problem with breakpoints (strucchange)
Hola!
I am using package strucchange, and encounters the following:
> bp <- breakpoints(diesel90 ~ regress -1, h=NULL)
Error in La.chol2inv(x, size) : element (14, 14) is zero, so the
inverse cannot be computed
The obvious problems have been checked, that is, the model matrix is
of full rank. What can be causing this?
I can send some data if that can be of help.
Kjetil Halvorsen
2011 May 31
1
splom Tick Location
When using the 'splom' function of the 'lattice' packge, is it possible to
get all the tick marks in the outer margins of the plot?
X <- as.data.frame(matrix(rnorm(1000), 100, 10))
plot(X) ## Tick marks are in the outer margin
splom(X) ## Tick marks are inside the on-diagonal panels
Thanks.
- Elliot
[[alternative HTML version deleted]]