Displaying 20 results from an estimated 20000 matches similar to: "Fw: Evaluating strings as variables"
2004 Jun 25
3
String manipulation
Hi,
let's see, if someone can help my with this one:
I have the string as follows:
> str<-("one","two","three")
Now I want to concatenate the items to one string, seperateted by space or
something else,
>str
>"one, two, three"
If possible without a loop.
My actual goal ist to create string like
>str.names
>"female = names1, male
2004 Jul 03
1
graphic representation of a qda object
Hi,
I'm a R newbie and I have a supervised 2-class classification problem.
To find out the best representation of my data (dim = 45). I want to perform LDA und QDA on the diffrent data representations to find out, which is best to discriminate the 2 sets. For LDA there exists a method plot.lda shows (in the 2 class case) a histogramm of the data, projected onto the linear discriminants (pleas
2005 Dec 19
1
help on barplots
Hello, I am a beginner with R and I would need some help with doing barplots.
My problem is that I would like to include both diffrent colors of the bars
and precence/absence of shading lines in the barplots. When reading in the
help file about the "col" command it states:
col: a vector of colors for the bars or bar components. By
default, grey is used if 'height'
2010 Nov 02
1
Colour filling in panel.bwplot from lattice
Inspired by colouring the dots of box-whisker plots I am trying to also
fill the boxes (rectangles) with different colours. This seems not to
work as I expected.
Looking at the help page of panel.bwplot it says: 'fill - color to fill
the boxplot'. Obviously it is only intended to fill all boxes with only
one colour?
Nevertheless the following example shows, that 'fill' from
2005 Jul 27
3
Asymmetric colors for heatmap
> Dear expeRts,
>
> Currently, my colors are as follows:
> mycol <-
> c("blue1","blue2","blue3","blue4","black","yellow4","yellow3","yellow2","y
> ellow1")
> heatmap(snp, Rowv=NA, Colv=NA, col=mycol)
>
> However, I would like to have the following colors:
> bright blue ->
2004 Mar 24
5
colors, lines, characters .... documentation
Hi,
Very so often when i am plotting something, doing a histogram, or
whatever i am struggling to find out which are the numbers for
different colors, palette names, types of lines, symbols, etc. Is
there any documentation on line with all these numbers / names
and the associated symbol / color???
For example if i am using the command image it uses a palette
from red to yellow, with red the
2010 Nov 20
1
Setting a Red->Yellow->Green Color Transition in Image(...) with yellow corresponding with the Mean Value...
In the following example I would like to have the color transition from
Red->yellow->green in the image(...) function, and if possible have the yellow
be set to correspond with the mean value (for the below 75).
?
I was able to figure something like out when using filled.contour(...), e.g.
filled.contour(ak.fan, levels = c(70, 73, 76,?80, 90), color = terrain.colors)
(I still
2007 Mar 22
2
Colored boxes with values in the box
Hi all,
I have a x, y matrix of numbers (usually ranging from 0 to 40). I need
to group these numbers and assign a color to each group (for example 0
to 15 - Blue, 16-30- Yellow, and 31-40- Red). Then I need to draw a
rectangular matrix which contains X x Y boxes and each box has the
corresponding value from the input matrix and is also colored according
to which group (i.e red, yellow,
2013 Jan 17
3
Getting discrete colors on plot
Hi,
This is my first post; I'm new to R but am a senior statistical programmer. I have done a lot of graphs using SAS Graph but now am trying to transition to using graphs in R.
I'm trying to produce a graph where the colors have three categories- ideally I would like them to be Green for good, Yellow for Questionable, and Red for bad.
So I tried to do this in GGPLOT; here is my code:
2005 Nov 14
1
bug/feature with barplot?
I have found a bug/feature with barplot that at least to me shows
undesireable behaviour. When using barplot and plotting fewer
groups/levels/factors(I am unsure what they are called) than the number
of colors stated in a col statement, the colors wrap around such that
the colors are not fixed to one group. This is mostly problematic when
I make R figures using scripts, since I sometimes have
2009 Oct 09
4
Satellite ocean color palette?
Dear List,
Is there a color palette avaliable similar to what is used in satellite ocean color imagery? I.e. a gradient with blue on one end and red on the other, with yellow in the middle? I have tried topo.colors(n) but that comes out more yellow on the end. I am looking for something similar to what is found on the CoastWatch web page:
2012 Mar 16
2
contingency tables
Ok, before I definetly give up, and throw the laptop out of the window, or
fill my data.frame manually, I'll ask for some help.
I have a data.frame named MyTable with 3 columns, that looks like this:
V1 V2 V3
red-j appearanceblood-n 105.032
red-j appearanceground-n 93.749
red-j appearancesea-n 102.167
red-j appearancesky-n 10.898
2009 Jan 26
2
heatmap with levelplot
Hi there,
I'd like to create a heatmap from my matrix with
a) a defined color range (lets say from yellow to red)
b) using striking colors above and below a certain threshold (above = "green",
below = "blue")
Example matrix (there should be a few outliers generated...) + simple levelplot
without outliers marked:
library(lattice)
my.mat <- matrix(rnorm(800), nrow =
2008 May 13
1
3dscatterplot -different colors for different factors of the same variable
Dear R users,
I was trying to do a 3d scatterplot for the following set of datas:
"obj" "time" "X" "Y"
"1" "yellow" "333" "388.7" "492.3"
"2" "yellow" "567" "388.7" "492.3"
"3" "green" "621" "135.5"
2012 Apr 06
2
Changing grid defaults
I'm trying to use the vcd package to produce mosaic plots for my class
notes, written in Sweave and using the LaTeX's beamer document class.
For projecting the notes in class, I use a dark background with light
foreground colors. It's easy enough to change the defaults for R's
standard graphics to match my color scheme (using the fg, col.axis,
col.lab, col.main, and col.sub
2013 Jan 08
4
error in a abline loop
Hello
I have data of body length and body weight of people of different skin colors.
I tried to write a code to plot body length and body weight according
to the skin colors.
(Thanks for Petr's advice so far.)
A loop is used but an error shows up in the following code.
It says:
unexpected '}' in
"
2013 Jan 26
3
Converting column of strings to boolean
Hi
I'm trying to convert a column of strings (nominal types) to a set of
boolean / binary / logical values. For example, in the column there is red,
blue, green and yellow. There are 100 rows and each has a colour. I want to
convert the column to 4 columns: red, blue, green,yellow and then either 1
or 0 put in the relevant row.
Thanks
--
View this message in context:
2008 Jun 06
4
color scale mapped to B/W
In an R graphic, I'm using
cond.col <- c("green", "yellow", "red")
to represent a quantitative variable, where green means 'OK', yellow
represents 'warning'
and red represents 'danger'. Using these particular color names, in B/W,
red is darkest
and yellow is lightest. I'd like to find color designations to replace
yellow and
2011 Feb 26
1
wireframe() display a graph with two colors, not a gradient.
Hi all,
I'm quite new to wireframe, essentially what I want to do is display a graph, and z-values > 1 would be yellow and those < 1 would be blue.
This is a bit of my data.
0.334643563 0.350913807 0.383652307
0.370325283 0.38779016 0.42387392
0.39861579 0.418389687 0.460692165
0.43888516 0.468015843 0.520560489
0.499544084 0.535099422 0.60982153
0.569888047 0.634351734
2002 May 15
3
Struchture change of a data frame
Hi guys
I've got an easy question but couldn't find any quick solution. I woulk
like to change the following matrix
good bad worse
Blue 1 2 2
Yellow 2 1 3
Black 3 4 4
Into the following structure
good 1 Blue
Bad 2 Blue
Worse 2 Blue
Good 2 Yellow
Bad 1 Yellow
Worse 2 Yellow
Good 2 Black
Bad 4 Black
Worse 4 Black
Thanks a lot.
Regards
Beat Huggler
---
Beat Huggler
Quantitative