similar to: Simple conditional plot

Displaying 20 results from an estimated 5000 matches similar to: "Simple conditional plot"

2011 Jul 08
4
How to label specific points on a scatterplot
Command I am using for the plot: plot(Raw[][Plate==101]~well[][Plate==101], xlab="Well", ylab="Raw", main="Plate 101") I only want to label points on the graph where well equals B13, G13, K14 and N14 with the name of the well. Thank you for your help. -- View this message in context:
2011 May 16
2
conditional rowsums in sapply
Hi all I have a data frame with duplicate columns and i want to remove duplicates by adding rows in each group of duplicates, but have lots of NA's. Data: dfrm <- data.frame(a = 1:4, b= 1:4, cc= 1:4, dd=1:10, ee=1:4) names(dfrm) <- c("a", "a", "b", "b", "b") dfrm[3,2:3]<-NA dfrm a a b b b 1 1 1 1 1 1 2 2 2 2 2 2 3
2010 Mar 16
2
Conditional variable assignment
Hi everyone, Once again I am stuck with a problem I can't seem to figure out. I suppose this learning curve levels off eventually, lol. I am learning on my own with absolutely no background in programming, so if I seem to request help a lot it's not because I am seeking others to do the work for me. I need to assign one of two arrival times to the 'ARRIVE' variable of my
2011 Sep 02
2
conditional replacement of character strings in vectors
Hello, I have a dataframe that looks like this: a b NA Honduras China NA NA Sudan Japan NA NA Mexico NA Mexico I would like to replace the NA values in column b with the non-NA values in column a. I have tried a number of techniques, (if, ifelse) but I must have the logic wrong. Thanks -- Josh [[alternative HTML version deleted]]
2023 Oct 13
1
Create new data frame with conditional sums
This seems like it should be simple but I can't get it to work properly. I'm starting with a data frame like this: Tract Pct Totpop 1 0.05 4000 2 0.03 3500 3 0.01 4500 4 0.12 4100 5 0.21 3900 6 0.04 4250 7 0.07 5100 8 0.09
2023 Oct 14
2
Create new data frame with conditional sums
Well, here's one way to do it: (dat is your example data frame) Cutoff <- seq(0, .15, .01) Pop <- with(dat, sapply(Cutoff, \(p)sum(Totpop[Pct >= p]))) I think there must be a more efficient way to do it with cumsum(), though. Cheers, Bert On Sat, Oct 14, 2023 at 12:53?AM Jason Stout, M.D. <jason.stout at duke.edu> wrote: > > This seems like it should be simple but I
2010 Sep 27
2
subtraction based on two groups in a dataframe
Hello I have a data set like below: plate.id well.id Group HYB rlt1 1 P1 A1 Control SKOV3hyb 0.190 2 P1 A2 Control SKOV3hyb 0.210 3 P1 A3 Control SKOV3hyb 0.205 4 P1 A4 Control SKOV3hyb 0.206 5 P1 A5 Control SKOV3hyb 0.184 385 P1 A1 ovca SKOV3hyb 0.184 386 P1 A2 ovca SKOV3hyb 0.229 387
2006 Oct 09
2
hello, acts_as_ferret questions, any help greatly appreciate
hi, ive been reading up on ferret, acts_as_ferret, and other search plugins for rails. after reading about ferret, i found out about the acts_as_ferrt plugin. my first question about acts_as_ferret: 1. from reading about ferret, do i still need to manually save the IDX and add a IDX column field to my model table for acts_as_ferret to work? they say that acts_as_ferret handles everything,
2008 Jul 06
1
What is my replication unit? Lmer for binary longitudinal data with blocks and two treaments.
First I would like to say thank you for taking the time to read it.Here is my problem. I am running a lmer analysis for binary longitudinal (repeated measures) data. Basically, I manipulated fruits and vegetation to two levels each(present and absent) and I am trying to access how these factors affect mice foraging behavior. The design consist of 12 plots, divided in 3 blocks. So each block
2013 Mar 06
2
Fwd: How to conditionally remove dataframe rows?
Hi, I have a data frame with two columns. I need to remove duplicated rows in first column, but I need to do it conditionally to values of the second column. Example: Point_counts Psi_Sp 1 A 0 2 A 1 3 B 1 4 B 2 5 B 0
2023 Oct 15
2
Create new data frame with conditional sums
Under the hood, sapply() is also a loop (at the interpreted level). As is lapply(), etc. -- Bert On Sun, Oct 15, 2023 at 2:34?AM Jason Stout, M.D. <jason.stout at duke.edu> wrote: > > That's very helpful and instructive, thank you! > > Jason Stout, MD, MHS > Box 102359-DUMC > Durham, NC 27710 > FAX 919-681-7494 > ________________________________ > From: John
2023 Oct 14
1
Create new data frame with conditional sums
That's very helpful and instructive, thank you! Jason Stout, MD, MHS Box 102359-DUMC Durham, NC 27710 FAX 919-681-7494 ________________________________ From: John Fox <jfox at mcmaster.ca> Sent: Saturday, October 14, 2023 10:13 AM To: Jason Stout, M.D. <jason.stout at duke.edu> Cc: r-help at r-project.org <r-help at r-project.org> Subject: Re: [R] Create new data frame with
2002 Apr 15
1
Nested ANOVA with covariates
Dear All, I'm rather a beginner on nested ANOVAs, so here goes with my 2 questions; Qu 1: I'm modelling the number of galls on a leaf (the response variable) as a function of; the tree on which I find the leaf, the branch on which I find the leaf. Then, the tree and the branch are both random factors, and I'm quite happy that I should write; aov(galls~tree/branch +
2011 Mar 13
1
Binning data
Hello I have a large series of data value -- effectivly say the point across the x-axis where a pitch crosses home plate. What I want to do is find the % of ground balls at various distances across home plate. I therefore need to 'bin' the two data sets I have - plate location for ground balls and plate location for all other outcomes. Question is how can I set up a series of bins
2011 Mar 12
2
Merge data under conditions
Dear All, Debuting in R, I'm facing a problem. I have 2 vectors, say 'a' et 'b', and I'd like to merge them according to the proximity of their variable 'time'. How to do to keep elements which satisfy (for example) 'a$time-b$time<0.5'? For example : > a time x 1 1.0 4 2 2.2 5 3 5.2 6 > b time y 1 0 1 2 1 3 3 2 5 4 4 7 5
2012 Nov 15
2
Adding two different factors to one observation?
In a data frame, I would like to assign two or more factors to one observation. Is it possible? If so, how? Example: In the variable $ dishes, there are several levels: "cup", "plate", "saucer". In my first observation, I see a saucer only. But in the second one, I see a cup and a saucer. In the third, however, there is only a cup, in the fourth a plate only and
2010 Feb 23
4
First. Last. Data row selection
I am in the process of switching from SAS over to R. I am working on very large CSV datasets that contain vehicle information. As I am processing the data, I need to select the first (or sometimes the second) record (by date) for any records that have the same license plate number. In SAS, there is a function called 'first.' that can be used on sorted datasets to pull out those first
2001 Aug 30
1
GLMMGibbs crashes on seeds data
Hi all I know GLMMGibbs is still in beta but has anyone experienced (and solved ;-) this problem? I decided to look at the seeds example but I get a core dump on two intel linux boxes and also a sun workstation. All are running R1.3.0 but different hardware/OS's so I think I've done something wrong > library(GLMMGibbs) > data(seeds) > seeds$plate <- as.factor(1:21) >
2011 Mar 14
1
Help- Fitting a Thin Plate Spline
Hi Everyone, I'm a pretty useless r-er but have data that SPSS etc doesn't like. I've managed to do GLMs for my data, but now need to fit a thin plate spline for my data (arcsine.success~date.num:clutch.size) If anyone has a bit of spare time and could come up with a bit of code I'd be very grateful- I just don't get R language! Thanks Rach -- View this message in context:
2007 Jun 15
1
A question about logical controls and function arguements
Dear R-help subscribers, I'm trying to write a function to generate data simulating the image created by a point radiation source in a plane on a screen where there is filter with a single circular aperture in it between the source and the screen. Following some guides (including Intro to R and some I found online) and examples I have specified the function (full code below question) with