Displaying 20 results from an estimated 10000 matches similar to: "axis colors in pairs plot"
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}),
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
2001 Sep 25
2
pairs() Legend
Hi,
Is it possible to create a legend in a pairs() plot?
For example, suppose I have the following R codes:
data(iris)
pairs(iris[1:4], main = "Anderson's Iris Data -- 3 species",
pch = 21, bg = c("red", "green3", "blue")[codes(iris$Species)])
How can I created a legend that shows which colour represents to which
Iris species?
Thanks,
2010 Sep 21
5
removed data is still there!
I'm confused, hope someone can point out what is not obvious to me.
I thought I was creating a new data frame by 'deleting' rows from an
existing dataframe - I've tried 2 methods.
But this new data frame seems to remember values from its parent - even
though there are no occurences.
Where does it get the values versicolor and virginica from and give then a
count of 0?
What
2013 Jan 01
3
translate grouped data to their centroid
Given a data set with a group factor, I want to translate the numeric
variables to their
centroid, by subtracting out the group means (adding back the grand means).
The following gives what I want, but there must be an easier way using
sweep or
apply or some such.
iris2 <- iris[,c(1,2,5)]
means <- colMeans(iris2[,1:2])
pooled <- lm(cbind(Sepal.Length, Sepal.Width) ~ Species,
2008 Sep 02
2
cluster a distance(analogue)-object using agnes(cluster)
I try to perform a clustering using an existing dissimilarity matrix that I
calculated using distance (analogue)
I tried two different things. One of them worked and one not and I don`t
understand why.
Here the code:
not working example
library(cluster)
library(analogue)
iris2<-as.data.frame(iris)
str(iris2)
'data.frame': 150 obs. of 5 variables:
$ Sepal.Length: num 5.1 4.9 4.7
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
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
2010 Sep 13
2
Saveing plot to multiple locations
Hi
Im trying to save a plot both to a pdf and as just a picture but without
success so if someone can help me I would be happy :)
my code:
require(party)
irisct <- ctree(Species ~ .,data = iris)
data(iris)
attach(iris)
pdf('/home/joel/Skrivbord/mammamu.pdf')
try(png('/home/joel/Skrivbord/mammamu1.png'))
plot(Sepal.Length, Petal.Length, col=unclass(Species))
legend(4.5, 7,
2018 Jan 28
0
Newbie wants to compare 2 huge RDSs row by row.
The diffobj package (https://cran.r-project.org/package=diffobj) is
really helpful here. It provides "diff" functions diffPrint(),
diffStr(), and diffChr() to compare two object 'x' and 'y' and provide
neat colorized summary output.
Example:
> iris2 <- iris
> iris2[122:125,4] <- iris2[122:125,4] + 0.1
> diffobj::diffPrint(iris2, iris)
< iris2
>
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]]
2018 Jan 28
1
Newbie wants to compare 2 huge RDSs row by row.
Thanks, I think I've found the most succinct expression of differences in two data.frames...
length(which( rowSums( x1 != x2 ) > 0))
gives a count of the # of records in two data.frames that do not match.
//
________________________________________
From: Henrik Bengtsson [henrik.bengtsson at gmail.com]
Sent: Sunday, January 28, 2018 11:12 AM
To: Ulrik Stervbo
Cc: Marsh Hardy ARA/RISK;
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
**************************
2012 Aug 28
1
Don't dput() data frames?
/src/main/attrib.c contains this comment in row_names_gets():
/* This should not happen, but if a careless user dput()s a
data frame and sources the result, it will */
which svn blame says Prof Ripley placed there in r39830 with the
commit message "correct the work of dput() on the row names of a data
frame with compact representation."
Is there a problem / better way to
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
2007 Feb 18
1
Help with pair plot
Hi,
I'm trying to create a plot using pair.
Currently I'm doing the following
pairs(~mpg + hp + wt , data=cars, labels = c("Miles per
Gallon","Horsepower","Weight"),pch = c(24,25)[unclass(cars$tr + 1)],
bg = c("red", "green3")[unclass(cars$tr + 1)],panel=panel.smooth)
for the attached dataset. However,instead of using panel.smooth I
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))