similar to: ggplot: geom_line with only pairs of points connected

Displaying 20 results from an estimated 1000 matches similar to: "ggplot: geom_line with only pairs of points connected"

2009 Jul 23
1
ggplot2 : commands on one line vs two lines.
I have just started using ggplot2 and I seem to be doing something stupid in writing ggplot2 commands on more than one line. In the example below the commands on one line are working fine, but as soon as I put them on two lines I get an error. Can any one point out what I am doing wrong? It must be something blindingly simple. Thanks Example
2012 Feb 28
1
group calculations with other columns for the ride
Hello, I can get the median for each factor, but I'd like another column to go with each factor. The nm column is a long name for the lvls column. So unique work except for the order can get messed up. Example: x =
2009 Aug 10
2
ggplot: colours to geom_segments
Just as an exercise I am tying to add colours to a geom_segment command. I can get one colour but not a sequence of colours. Can anyone suggest how I can get the green lines in the plot below to be different colours? I thought I could use a palatte of colours but that did not seem to work. Thanks ========================================================================= library(ggplot2) xx
2013 Apr 09
1
(no subject)
Hi I would like to normalize my data by one of the variables in long format. My data is like this: > t1<-data.frame(id=rep(1:3,rep(3,3)),dt=rep(1:3,rep(9,3)),var=c('num1','num2','norm'),value=rnorm(27)) > t1 id dt var value 1 1 1 num1 -1.83276256 2 1 1 num2 1.57034303 3 1 1 norm 0.60008563 4 2 1 num1 -0.96893477 5 2 1 num2 0.30423346 6
2010 Apr 20
2
having more than one plot in one figure
Hi All, I have been trying to plot multiple line plots with different colors on one figure. in my example below I was able to plot cat vs num1 as a dot plot connected with lines but was not able to do that for cat vs num2 and I do not know how to add the third plot cat vs num3. below is my code df <- data.frame(cat=1:10, num1=rnorm(10), num2=rnorm(10), num3=rnorm(10)) plot(df$num1,
2010 Apr 12
2
Interpreting factor*numeric interaction coefficients
Dear all, I am a relative novice with R, so please forgive any terrible errors... I am working with a GLM that describes a response variable as a function of a categorical variable with three levels and a continuous variable. These two predictor variables are believed to interact. An example of such a model follows at the bottom of this message, but here is a section of its summary table:
2006 Feb 09
1
List Conversion
Hello, I have a list (mode and class are list) in R that is many elements long and of the form: >length(list) [1] 5778 >list[1:4] $ID1 [1] "num1" $ID2 [1] "num2" "num3" $ID3 [1] "num4" $ID4 [1] NA I'd like to convert the $ID2 value to be in one element rather than in two.?? It shows up as c(\"num2\", \"num3\") if I try to use
2011 Jan 17
2
matrix manipulations
Hi, I am having some difficulties with matrix operations. It is a little hard to explain it so please bear with me. I have a very large data set, large enough that it needs to be split in parts in order to deal with. I can work things on these "parts" but the problem lies in adding together these parts for the final answer. So that been said, let's say that i split the data in 2
2011 Aug 06
1
help with predict for cr model using rms package
Dear list, I'm currently trying to use the rms package to get predicted ordinal responses from a conditional ratio model. As you will see below, my model seems to fit well to the data, however, I'm having trouble getting predicted mean (or fitted) ordinal response values using the predict function. I have a feeling I'm missing something simple, however I haven't been able to
2009 Dec 02
1
Lattice: multiple data sets on same plot
Hi, I have two data sets; one is a population and the other a sample of that population. I am trying to plot both on the same trellis display. # Example data set with two numerical attributes and two categorical pop <- data.frame(var1=rnorm(2000, 2000, 500), var2=rnorm(2000, 2000, 500)) cat<-(runif(2000)<=.5)+0 for(i in 1:length(cat)){ if(cat[i] == 0){ pop[i,"cat1"] =
2005 Sep 05
2
USING TWO ACCOUNTS WITH BROADVOICE
Hi, I have two accounts with broadvoice. Now, I want to be able to distinguish between them. I though that this would be simple by adding "/EXTEN" at the end of the register statement. For example: register => num1:pass@sip.broadvoice.com/1000 Unfortunately, this is not working. When I call into my box I hear busy tone. My config looks like this: [root@voip asterisk]# cat sip.conf
2005 Jul 28
1
Unexpected behavior in recode{car}
Thanks to the R creators for such a great statistical system. Thanks to the R help list, I have (finally) gotten far enough in R to have a question I hope to be worth posting. I'm using the recode function from John Fox's car package and have encountered some unexpected behavior. Consider the following example: ## Begin cut-and-paste example require( car ) set.seed(12345) nn <-
2011 Feb 28
3
Problems using unique function and !duplicated
Hi, I am trying to simultaneously remove duplicate variables from two or more variables in a small R data.frame. I am trying to reproduce the SAS statements from a Proc Sort with Nodupkey for those familiar with SAS. Here's my example data : test <- read.csv("test.csv", sep=",", as.is=TRUE) > test date var1 var2 num1 num2 1 28/01/11 a 1 213 71 2
2006 Aug 24
1
Using a 'for' loop : there should be a better way in R
I need to apply a yearly inflation factor to some wages and supply some simple sums by work category. I have gone at it with a brute force "for" loop approach which seems okay as it is a small dataset. It looks a bit inelegant and given all the warnings in the Intro to R, etc, about using loops I wondered if anyone could suggest something a bit simpler or more efficent? Example:
2017 Dec 04
1
ggtern and bquote...
D'oh! Thanks for pointing this out. I blame caffeine depletion at the time... -pd > On 4 Dec 2017, at 15:48 , Eik Vettorazzi <E.Vettorazzi at uke.de> wrote: > > reading ?plotmath you might notice that "_" isn't the propper syntax for > subscripts. This will work: > > ggtern(data=x11,aes(A,B,C,xend = c(0.7,.00,0.7),yend = > c(.30,.50,.0),zend
2010 Feb 01
1
How to repeat "for" function?
Dear Users, I have one problem here, I tried many time and even read a few notes on writing function but still..... Can anyone help me on how to simplify Part B (please refer the programming below), so that I don't have to repeat the calculation of "num" and "r" ? Thank you very much..every help is very much appreciated... ## Part A n=1400 m=matrix(c(0,0,0,0),4,1)
2012 Sep 20
1
aggregate help
I want to count attributes of IDs: --8<---------------cut here---------------start------------->8--- z <- data.frame(id=c(10,20,10,30,10,20), a1=c("a","b","a","c","b","b"), a2=c("x","y","x","z","z","y"),
2017 Dec 04
0
YNT: ggtern and bquote...
reading ?plotmath you might notice that "_" isn't the propper syntax for subscripts. This will work: ggtern(data=x11,aes(A,B,C,xend = c(0.7,.00,0.7),yend = c(.30,.50,.0),zend =c(.0,.50,0.3)))+ geom_point()+ theme_showarrows()+geom_segment(size=.5)+ geom_text_viewport(x=c(.45,.27,.37),y=c(.32,.29,.22),label=c("P[a]","P[b]","P[c]"), parse=TRUE)
2009 Nov 17
2
Lattice plot
Hi, I was trying to get a graph in lattice with the following data frame (7 rows, 5 cols): chr start1 end1 meth positive 1 1 10 20 1.5 y 2 2 12 18 -0.7 n 3 3 22 34 2.0 y 4 1 35 70 3.0 y 5 1 120 140 -1.3 n 6 1 180 190 0.2 y 7 2 220 300 0.4 y I wanted the panels to be organized by 'chr' -
2017 Dec 04
1
YNT: ggtern and bquote...
Hi, My example code is this; x11<-data.frame(A=c(.6,.6,.6),B=c(.20,.20,.20),C=c(0.20,.20,.20)) ggtern(data=x11,aes(A,B,C,xend = c(0.7,.00,0.7),yend = c(.30,.50,.0),zend =c(.0,.50,0.3)))+ geom_point()+ theme_showarrows()+geom_segment(size=.5)+ geom_text_viewport(x=c(.45,.27,.37),y=c(.32,.29,.22),label=as.expression("P_a","P_b","P_c"))