similar to: Multiple lines with a different color assigned to each line (corrected code)

Displaying 20 results from an estimated 1000 matches similar to: "Multiple lines with a different color assigned to each line (corrected code)"

2008 Apr 22
3
Using the 'by' function within a 'for' loop
Dear R experts, I am sorry for sending this email again. I would imagine yesterday and maybe today, have been very busy days with the release of R v 2.7.0. I join all the R users who are very gratful for your contant work and efforts, specially knowing that you are doing this for the sake of science, without gettig any compensation for that. Having written that, I decided to send the
2005 Oct 27
3
outer-question
Dear all, This is a rather lengthy message, but I don't know what I made wrong in my real example since the simple code works. I have two variables a, b and a function f for which I would like to calculate all possible combinations of the values of a and b. If f is multiplication, I would simply do: a <- 1:5 b <- 1:5 outer(a,b) ## A bit more complicated is this: f <-
2005 Oct 27
3
outer-question
Dear all, This is a rather lengthy message, but I don't know what I made wrong in my real example since the simple code works. I have two variables a, b and a function f for which I would like to calculate all possible combinations of the values of a and b. If f is multiplication, I would simply do: a <- 1:5 b <- 1:5 outer(a,b) ## A bit more complicated is this: f <-
2008 Feb 05
6
Sampling
Hi there, I want to generate different samples using the followindg code: g<-sample(LETTERS[1:2], 24, replace=T) How can I specify that I need 12 "A"s and 12 "B"s? Thank you, Judith ____________________________________________________________________________________ Be a better friend, newshound, and
2009 Aug 25
3
Regular expression to define contents between parentheses
Hello dear R-helpers, I haven't been able to figure out of find a solution in the R-help archives about how to delete all the characters contained in groups of parenthesis. I have a vector that looks more or less like this: myvector<-c("something (80 km/h, sd) & more (6 kg/L,sd)", "somethingelse (48 m/s, sd) & moretoo (50g/L , sd)") I want to extract all
2008 Feb 21
3
R console closes on its own
Dear R-experts, I am running a script that has the following structure: windows(height=5.5,width=8) dat<-read.csv("myfile.csv") names(dat)<-c('a','b','c','d') dat<-dat[,1:4] xyplot(dat$a~dat$b) Then I usually save the plot as a PDF (from the menu in the R console). I can save the PDF twice in a row; but at the third time, right when I
2012 Sep 18
1
Cochran-Mantel-Haenszel test
Hello, I have some satellite tag time-at-depth (TAD) frequency data that I would like some help with. The data was transmitted via satellite as percent time spent in each of 7 depth bins (0m, 0-1m, 1-10m, 10-50m etc.), binned over 6-hour intervals. I categorized each row of data corresponding to a date and time into summer vs. winter, and day vs. night, and then summed and averaged the given
2007 Jun 13
2
Removing Inf and Inf values from a fata frame
Hi, I have a csv file with empty values, when I apply the different functions (mean, std, etc.) I create a new data frame, the empty values generate Inf and -Inf values. How can I remove those Inf and -Inf values from the new data frame? I already specified na.rm in the mean and std functions, but the values are still there. Thank you, Judith
2007 Jul 02
2
Substitution of Variables
Hi, I need to run a script under the variable (that comes from a csv file) that is assigned to another variable. This is very a simplified version of what I want to do: data<-read.csv('name.csv') names(data)<-("VA","VB","VC") v<-VA mn(v) Thank you in advance, Judith
2008 Feb 27
2
Add a rectangle behind a plot
Hi there, I found one reference to add a reactangle behind a plot using plot(...,add=T), I tried this but didn't obtain the desired result. If a I have the following code: plot(x,y) rect(xleft, ybottom, xright,ytop,col='green) The rectangle appear on top of the plot. Any help will be greatly appreciated, Judith
2007 Dec 03
3
Ordering the levels of a vector
Hi, I have a vector in a data frame that looks something like this: day<-c('Day -1','Day 6','Day 10') This vector specifies the order in which several panel will appear in a lattice plots. But the order in which such plots will appear will be the following: Day -1, Day 10, Day 6. Which makes sense, but I cannot name the Days like this: Day -01,Day 10, Day 06,
2014 Nov 28
2
[RFC PATCHv1] armv7: celt_pitch_xcorr: Introduce ARM neon intrinsics
Review comments inline. > +if OPUS_ARM_NEON_INTR > +noinst_LTLIBRARIES = libarmneon.la > +libarmneon_la_SOURCES = $(CELT_SOURCES_ARM_NEON_INTR) > +libarmneon_la_CPPFLAGS = $(OPUS_ARM_NEON_INTR_CPPFLAGS) -I$(top_srcdir)/include > +endif I don't think these should be in a separate library. It brings with it lots of complications (to name one: wouldn't the .pc files need to
2012 Feb 06
2
Reordering levels of a factor when the factor is part of a data frame
Hello R-users,    I have a data frame whose names of columns I don't know a priori, but the user of my code will know them. The user is supposed to save the name of the column that will need some reordering of the levels of the factor later on. The name of the column will be saved in an object called: variab the data frame is called df. If I try to the do following:
2007 May 22
4
Legend outside plotting area
Hi, I have been trying many of the suggested options to place a legend outside plotting area, including something like this: par(xpd=T, oma=par()$oma+c(4.5,0,1.5,0),mar=par()$mar+c(1,0,1,0) But the aspect of the four plots gets compromised when I change the margin settings. I cannot use mtext because I need to use colors for the text. I tried layout, but wouldn't let me include
2014 Dec 09
1
[RFC PATCH v2] armv7: celt_pitch_xcorr: Introduce ARM neon intrinsics
Viswanath Puttagunta wrote: > + SUMM = vdupq_n_f32(0); It kills me that there's no intrinsic for VMOV.F32 d0, #0 (or at least I couldn't find one), so this takes two instructions instead of one. > + /* Consume 4 elements in x vector and 8 elements in y > + * vector. However, the 8'th element in y never really gets > + * touched in this loop. So, if len == 4,
2008 Apr 23
2
Replecing empty values with a letter (continuation)
Sorry, I hit the send botton by accident. Here is my code so far: dat<-read.csv('myfile.csv', na.strings="") dat[is.na(dat]<-'N' But it doesn't replace the <NA> for the letter 'N'. I am using R v 2/7/0, running it under Windows XP. Thank you, Judith
2013 Mar 07
3
ggpliot2: reordering of factors in facets facet.grid(). Reordering of factor on x-axis no problem.
Hi everyone (again), before you all start screaming that the reordering of factors has been discusse on several threads and is not particular to ggplot2, hear me out. I can easily reorder my x-axis factor in facet.grid() in ggplot2. What I cannot reorder are the factors represented on the strips. I can see that the graphs are changing, so I am afraid of what it is I am doing. Why is ggplot2
2009 Apr 10
2
Stacked density plots
Hello R-community, I want to generate stacked density plots in lattice. My data consist of a numeric variable ('pid') that is measured in different individuals ('id'), which can be divided in two types ('type') and the measurements were repeated a different time points ('day'). I read in the Lattice book that this can be done using the 'flowViz'
2010 Apr 01
2
Adding regression lines to each factor on a plot when using ANCOVA
Dear R users, i'm using a custom function to fit ancova models to a dataset. The data are divided into 12 groups, with one dependent variable and one covariate. When plotting the data, i'd like to add separate regression lines for each group (so, 12 lines, each with their respective individual slopes). My 'model1' uses the group*covariate interaction term, and so the coefficients
2013 Jan 09
1
problem adding curve/abline
Hey, I'm stuck on something I already did before (just a different kind of database), and whatever I try, it doesn't work anymore. So thanks for your help. Here's how my data approximately looks like: year season replicate size freq weight 2000 summer ch1 6 1 45 2000 summer ch1