Displaying 20 results from an estimated 10000 matches similar to: "pairs() Legend"
2005 Apr 07
2
axis colors in pairs plot
The following command produces red axis line in a pairs
plot:
pairs(iris[1:4], main = "Anderson's Iris Data -- 3 species",
pch = "+", col = c("red", "green3", "blue")[unclass(iris$Species)])
Trying to fool pairs in the following way produces the
same plot as above:
pairs(iris[1:4], main = "Anderson's Iris Data -- 3
2007 Aug 28
2
Limiting size of pairs plots
Dear R-users,
I would like to add a legend at the bottom of pairs plots (it's my first
use of this function). With the plot function, I usually add some
additional space at the bottom when I define the size of the graphical
device (using mar); grid functions then allows me to draw my legend as I
want.
Unfortunatley, this technique does not seem to work with the pairs
function as the
2009 Jan 31
1
display p-values and significance levels
Hi there,
I got a piece of code for the Iris data which allows to display correlation
coefficients for each Iris species in the lower panel (color coded). I would
now like to add e.g. a "*" to show the significance of each correlation next
to the correlation coefficient.
Furthermore I would like to make a t.test between the species "setosa" and
"versicolor" for
2005 Jul 08
3
pairs() uses col argument for axes coloring
Hi list,
not sure if this is the wanted behavior, but running the following code:
> version
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 1.1
year 2005
month 06
day 20
language R
> n <- 500
> d <- 4
> m <- matrix(runif(n*d, -1, 1), ncol=d)
> c <- hsv(apply(m, 1, function(x) {sum(x*x)/d}),
2005 Jul 08
3
pairs() uses col argument for axes coloring
Hi list,
not sure if this is the wanted behavior, but running the following code:
> version
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 1.1
year 2005
month 06
day 20
language R
> n <- 500
> d <- 4
> m <- matrix(runif(n*d, -1, 1), ncol=d)
> c <- hsv(apply(m, 1, function(x) {sum(x*x)/d}),
2003 Jun 25
2
Pairs with different colours
Does anybody know how to make pairs graphics with dots of different colours depending on the value of a categorical variable ?
Thanks,
Arnaud
*************************
Arnaud DOWKIW
Department of Primary Industries
J. Bjelke-Petersen Research Station
KINGAROY, QLD 4610
Australia
T : + 61 7 41 600 700
T : + 61 7 41 600 728 (direct)
F : + 61 7 41 600 760
**************************
2004 Sep 14
1
pairs correlations colors
I have the following problem.
I want to use pairs function and get a matrix of scatterplots with the
correlations in the upper panel and the ordinary scatterplots in the
lower panel.
Moreover, I want to have points colored in five differet ways in the
lower panel, because I have five subgroups.
In order to do that I tried to combine examples on pairs function help.
I got a colored matrix
2003 Jan 07
2
Extracting means for given strata from dissimilarity object
Is there a way of extracting mean distance or dissimilarity for a given
strata from a 'dist' or 'dissimilarity' object, e.g. extract mean distances
for each species in Anderson's iris data?
data(iris)
iris.dist<-dist(iris[,1:4])
then what?
Mikkel Grum, PhD
Genetic Diversity Scientist
International Plant Genetic Resources Institute (IPGRI)
Sub-Saharan Africa Group
***
2009 Dec 13
1
odfWeave produces output file that OO can't open
Dear R-helpers,
I'm trying to learn how to use odfSweave.
Here is my source file (in /Users/mk/myTeach/2010-1-7720/odfWeave):
****************************************
Analysis of the iris Data
Created on \Sexpr{date()}
<<loadLibs, echo = FALSE, results = hide>>=
# I usually load the libraries first so that any output produced by loading the library does not end up in the
2008 Jun 11
1
specifying ranges in scatter plot
Hi, there:
Does anyone know how to specify the ranges in the axises when I make
scatter plots using pairs()? In the general plot function, I can use
xlim and ylim option. But how can I do this if I use pairs()?
Thanks.
Yulei
[[alternative HTML version deleted]]
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))
2001 Feb 10
3
Scatterplot - symbols coded by factor
Hi - I would like to create a scatterplot with the symbols coded by a factor in each record. Is their a better way than what I have used below? I attempted to use the plot.factor, but cannot force it to make a scatterplot instead of boxplots. I have considerd making a function with a 'for' statement for each level of the factor. Is there a better way for when I am dealing with more
2005 Sep 05
2
Fisher's method in discriminant analysis
Hi,
I'm using mda library to solve a discriminant
analysis. I get results, but the thing is that I want
to use Fisher's method to obtain the classification
functions and I'm lost in what I should do: libraries
to use, ... Can anybody give me a clue??
Thanks.
Carlos Niharra L??pez
2012 Dec 10
3
splitting dataset based on variable and re-combining
I have a dataset and I wish to use two different models to predict. Both models are SVM. The reason for two different models is based
on the sex of the observation. I wish to be able to make predictions and have the results be in the same order as my original dataset. To
illustrate I will use iris:
# Take Iris and create a dataframe of just two Species, setosa and versicolor, shuffle them
2011 Aug 16
3
Newbie question - struggling with boxplots
Hopefully I will not be flamed for this on the list, but I am starting out
with R and having some trouble with combining plots.
I am playing with the famous iris dataset (checking out example dataset in R
while reading through Introduction to datamining)
What I would like to do is create three graphs (combined boxplots) besides
each other for each of the three species (Setosa, Versicolour and
2010 Oct 22
2
Random Forest AUC
Guys,
I used Random Forest with a couple of data sets I had to predict for binary
response. In all the cases, the AUC of the training set is coming to be 1.
Is this always the case with random forests? Can someone please clarify
this?
I have given a simple example, first using logistic regression and then
using random forests to explain the problem. AUC of the random forest is
coming out to be
2013 Mar 02
2
caret pls model statistics
Greetings,
I have been exploring the use of the caret package to conduct some plsda
modeling. Previously, I have come across methods that result in a R2 and
Q2 for the model. Using the 'iris' data set, I wanted to see if I could
accomplish this with the caret package. I use the following code:
library(caret)
data(iris)
#needed to convert to numeric in order to do regression
#I
2004 Aug 21
2
more on apply on data frame
Hi R People:
Several of you pointed out that using "tapply" on a data frame will work on
the iris data frame.
I'm still having a problem.
The iris data frame has 150 rows, 5 variables. The first 4 are numeric,
while the last is a factor, which has the Species names.
I can use tapply for 1 variable at a time:
>tapply(iris[,1],iris[,5],mean)
setosa versicolor virginica
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
2006 Oct 26
2
distance between legend title and legend box
Hi,
I've looked at the parameters available for the legend function and
cannot find a way to change the distance between the top of the box
surrounding a legend and the legend's title. I have a math expression
that raises the height of my title.
If you don't mind the non-sensical title I give to the legend for
this plot (Figure 3.20 in R Graphics):
with(iris,