[R] change color scheme in mvpart
Hello everyone, I am currently using the mvpart package and would like to change the color scheme it uses, and was hoping someone could help me out. All of the papers I have found have used a grayscale but I can't seem to figure out how they did that! Currently, mvpart plots barplots in a repeating sequence of 3 shades of blue. So if you have 6 response variables the same shade of blue is used to represent two different response variables. I would like to use grayscale and a different shade of gray for each response variable (I have 7). However, the color is more important so if I can only use 3 shades of gray thats fine. Thank you!! --- Leanne Heisler Graduate Student Department of Biology University of Regina [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] change color scheme in mvpart
From: dwinsem...@comcast.net To: leanneheis...@hotmail.com Subject: Re: [R] change color scheme in mvpart Date: Mon, 23 Apr 2012 19:20:06 -0400 The fact that you are posting in HTML indicates that a) you have either not read the Posting Guide or b) do not know enough about your mailer to adhere to its advice or c) perhaps are just headstrong and do not mind annoying the people who think it is a good idea. Perhaps you also have decided not to follow its advice and post reproducible code? As they say ... Yer call, mate: http://www.youtube.com/watch?v=pKBzZIhHTtA Sorry. Again, I am currently using the mvpart package and would like to change the color scheme it uses, and was hoping someone could help me out. All of the papers I have found have used a grayscale but I can't seem to figure out how they did that! Currently, mvpart plots barplots in a repeating sequence of 3 shades of blue. So if you have 6 response variables the same shade of blue is used to represent two different response variables. I would like to use grayscale and a different shade of gray for each response variable (I have 7). However, the color is more important so if I can only use 3 shades of gray thats fine. As for reproducible code: using libraries ade4, vegan, gclus, cluster, RColorBrewer, labdsv, mvpart, MVPARTwrap spe.mvpart - mvpart(data.matrix(spe) ~ ., env, cp=0, xv1se, xval=10, xvmult=100, uniform=TRUE) I didn't include my data but if you need it, I will email you a subset. --- Leanne Heisler Graduate Student Department of Biology University of Regina __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] geoXY
Hi Everyone, I am new to R Language and was wondering if someone could help me convert my latitude-longitude coordinates to cartesian coordiantes using geoXY() from SoDA package? I have been uploading my coordinates from a text file into R (they originate as a dataframe) and them converting them to a matrix using the data.matrix() function. But I think I'm running into trouble when I try to use the geoXY() function with the matrix data. This is what I've tried so far, attached is the text file I've been using. It would be great if someone could tell me what I'm doing wrong so I know for future reference. xy - read.table(SMSPA.txt) head(xy) XY V1 V2 1X Y 2 49.02988 -99.3662 3 49.36558 -101.12703 4 49.64091 -99.65275 5 49.37323 -101.11609 6 49.36558 -101.12703 data.matrix(xy) V1 V2 [1,] 1164 1168 [2,] 27 1166 [3,] 2842 [4,] 338 1167 [5,] 2851 [6,] 2842 library(SoDA) geoXY(xy@latitude, xy@longitude, unit=1000) Error in geoXY(xy@latitude, xy@longitude, unit = 1000) : trying to get slot latitude from an object of a basic class (matrix) with no slots geoXY(V1@latitude, V2@longitude, unit=1000) Error in geoXY(V1@latitude, V2@longitude, unit = 1000) : object 'V1' not found geoXY(xy) Error in min(longitude, na.rm = TRUE) : 'longitude' is missing Thanks! --- Leanne Heisler Graduate Student Department of Biology University of Regina [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.