similar to: pairs() uses col argument for axes coloring

Displaying 20 results from an estimated 10000 matches similar to: "pairs() uses col argument for axes coloring"

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
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,
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 Feb 12
2
barplot() x axes are not updated after removal of categories from the dataframe
Hi all, I'd be grateful for your help. I am a new user struggling with a barplot issue. I am plotting categories (X axis) and their mean count (Y axies) with barplot(). The first call to barplot works fine. I remove records from the dataframe using final=[!final$varname == "some value",] I echo the dataframe and the records are no longer in the dataframe. When I call plot again
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
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 **************************
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,
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
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
2007 Apr 24
1
NA and NaN randomForest
Dear R-help, This is about randomForest's handling of NA and NaNs in test set data. Currently, if the test set data contains an NA or NaN then predict.randomForest will skip that row in the output. I would like to change that behavior to outputting an NA. Can this be done with flags to randomForest? If not can some sort of wrapper be built to put the NAs back in? thanks, Clayton
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]]
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
2012 Apr 15
2
xyplot type="l"
Probably a stupidly simple question, but I wouldn't know how to google it: xyplot(neuro ~ time | UserID, data=data_sub) creates a proper plot. However, if I add type = "l" the lines do not go first through time1, then time2, then time3 etc but in about 50% of all subjects the lines go through points seemingly random (e.g. from 1 to 4 to 2 to 5 to 3). The lines always start at time
2006 Jul 11
2
R newbie: logical subsets
Hello! I'm a newcomer to R hoping to replace some convoluted database code with an R script. Unfortunately, I haven't been able to figure out how to implement the following logic. Essentially, we have a database of transactions that are coded with a geographic locale and a type. These are being loaded into a data.frame with named variables city, type, and price. E.g., trans$city
2018 Jan 28
2
Newbie wants to compare 2 huge RDSs row by row.
The anti_join from the package dplyr might also be handy. install.package("dplyr") library(dplyr) anti_join (x1, x2) You can get help on the different functions by ?function.name(), so ?anti_join() will bring you help - and examples - on the anti_join function. It might be worth testing your approach on a small subset of the data. That makes it easier for you to follow what happens
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
2006 Sep 22
3
extract data from lm object and then use again?
Hi list, I want to write a general function so that it would take an lm object, extract its data element, then use the data at another R function (eg, glm). I searched R-help list, and found this would do the trick of the first part: a.lm$call$data this would return a name object but could not be recognized as a data.frameby glm. I also tried call(as.character(a.lm$call$data)) or
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 >
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;