similar to: does there any function like sumif in excel?

Displaying 20 results from an estimated 3000 matches similar to: "does there any function like sumif in excel?"

2008 Mar 04
1
equivalent of excel "sumif"
R-help, I have two data frames df1 and df2: >head(df1) lgdcm 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... ... > head(df2)
2008 Apr 25
4
Equivalent of Excel pivot tables in R
Can somebody tell me how to do the equivalent of a pivot table in R ? For example, if I have : var1 var2 var3 a x 10 b y 20 a z 10 b z 20 a z 10 b z 20 I could have : x y z a 1 0 2 b 0 1 2 where entries in the table are counts of var3.
2010 May 14
2
Subscripting a matrix-like object
I have an S3 class called "tis" (Time Indexed Series) which may or may not have multiple columns. I have a function "[<-.tis" that I've reproduced below. My question is this: inside of "[<-.tis", how can I distinguish between calls of the form x[i] <- someValue and x[i,] <- someValue ? In either case, nargs() is 3, and looking at the values
2010 May 14
2
Subscripting a matrix-like object
I have an S3 class called "tis" (Time Indexed Series) which may or may not have multiple columns. I have a function "[<-.tis" that I've reproduced below. My question is this: inside of "[<-.tis", how can I distinguish between calls of the form x[i] <- someValue and x[i,] <- someValue ? In either case, nargs() is 3, and looking at the values
2007 May 07
1
Simple question about function with glm
Dear all, I coded a function called u.glm u.glm <- function (x,ahi,age,bmiz,gender) { library(nortest) lil.rslt <- lillie.test(x) if (lil.rslt$p.value >0.05) { cat("Logtrans=0, lillie=",lil.rslt$p.value,"\n") xmodel<-glm(x~ahi+age+bmiz+as.factor(gender)) summary(xmodel) confint(xmodel) } else { cat("Logtrans=1,
2007 Aug 30
3
piecewise linear approximation
Dear list, I have a series of data points which I want to approximate with exactly two linear functions. I would like to choose the intervals so that the total deviation from my fitted lines is minimal. How do I best do this? Thanks! Kamila The information transmitted in this electronic communication...{{dropped}}
2007 Aug 29
1
combining datasets by row
Rusers, I am trying to append multiple .csv files of different dimensions (but # of columns are the same for all .csv files). I do have .csv files whose names are CA1.csv ~ CA100.csv. CA means california and 1 means the first file. So what I have been doing (after googling how to append by row multiple files) was: cleanup_data<-function(state,count) { out<-matrix() for (i in 1:
2011 May 04
1
Reference Classes: replacing '.self' with an .Rda image of '.self' from within a method? (was replacing '.self' with an .Rda image of '.self' from within a method?)
Sorry guys, but I chose a really stupid name before (no "reference classes"). Hope it's okay to re-post. Cheers, Janko >>> ORIGINAL MESSAGE <<< Dear list, Is it possible to update or reassign '.self' with an image of '.self' (e.g. a locally stored .Rda file) from within a method? I know that this might sound akward, but here's the use
2005 Feb 24
3
Inheriting variables
I'm trying to set a channel variable and make it available to another channel: I thought that if I SetVar(_SomeVariable=SomeValue) or SetVar(__SomeVariable=SomeValue) then SomeVariable would be available in the destination channel. However __SomeVariable, _SomeVariable and SomeVariable are all blank. The scenario: Agents logon to the queue using callbacklogin. From what I can gather
2007 Aug 29
2
a new-bie question about obtaining certain value from the print out
Hi everyone, I am quite new to R. my command is t.test(c(1:5,7:11), y=c(1:10),alternative = c("two.sided"), paired = TRUE) The output is Paired t-test data: c(1:5, 7:11) and c(1:10) t = 3, df = 9, p-value = 0.01496 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: 0.1229738 0.8770262 sample estimates: mean of the differences
2013 Jan 01
1
Order variables automatically
Hi, I have a dataset with 6 categorical variables. I have used this following code to make the variables u1-u6 ordered factors and this works well. cat1cat2 cat3 cat4 cat5 cat6 ? 0 ? ?? 1 ? ? 1????? 0 ??? 0? ?? 1 ? 1 ? ?? 1 ? ? 0 ? ?? 0 ? ? 0 ? ? 0 ....... .... ############ data<-read,table("example.txt") data <- as.data.frame(lapply(data, ordered)) ############ Now,
2007 Jan 21
1
identify selected substances across individuals
An embedded and charset-unspecified text was scrubbed... Name: inte tillg?nglig Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070121/436ed377/attachment.pl
2011 Mar 21
3
Computing row differences in new columns
Hi I have the following columns with dates and results, sorted by subject and date. I'd like to compute the differences in dates and results for each patient, based on the previous row. Obviously the last entry for each subject should be a NA. Which would be the best way to accomplished that ? I guess questions like that have been already answered a thousand times, so I apologize for
2018 Jun 08
3
rpmbuild --define | some rpm sorcerer around?
On 08/06/18 19:38, Phil Perry wrote: > On 08/06/18 15:54, lejeczek wrote: >> hi >> >> how do you pass vars to rpmbuild for definition? eg >> >> rpmbuild --define \'"${_definition2}"\' >> >> I've been fiddling with ways to escape, but none is >> fricking working.. >> I mean, rpmbuild rushes to work(no errors nor
2019 Jun 17
2
[InstCombine] addrspacecast assumed associative with gep
> What do you mean exactly by "behave differently on the other side of the cast”? Do you have a concrete example? I was hesitant to say only in that it is probably an "abuse of mechanics" and definitely playing with fire, _however_ the target I'm working on has extensive bit operations for a subset of memory, including atomic test-and-set, etc. It's convenient to be
2013 Jan 17
1
Help with interpolation
hi guys I need to interpolate values for the zero coupon yield curve. Following data is given date days rate 1996 01
2009 Sep 23
2
R + C + Lapack toy regression example
dear list, since matrix manipulations is often of interest in statistical computations, i'd like to get a working example of using Lapack for regression. However, i run into an error. My matrix-lapack-example.c file: #include <R_ext/Lapack.h> void reg(const char* trans, const int* m, const int* n, const int* nrhs, double* a, const int* lda, double* b, const int*
2009 Jan 22
4
text vector clustering
Hi, I am a new user of R using R 2.8.1 in windows 2003. I have a csv file with single column which contain the 30,000 students names. There were typo errors while entering this student names. The actual list of names is < 1000. However we dont have that list for keyword search. I am interested in grouping/cluster these names as those which are similar letter to letter. Are there any
2006 Jun 07
19
Quad T1 Card
Ok... I am reluctant to ask this question as I believe that it may be like asking what someones favorite linux distribution is... but I need to make an informed decision. We are getting ready to upgrade from a TE210P to a quad T1 card with echo cancellation. I am trying to decide between the Sangoma card and the Digium card. I need this to have great quality and I need it to work well. I would
2012 Nov 05
1
Plot 3 lines in one graph
I'm new with R. I want to plot 3 lines in one graph. This is my data: print(x) V1 V2 V3 V41 -4800 25195.73 7415.219 7264.282 -2800 15195.73 5415.219 7264.28 I tried using matplot, but I cannot get exactly what I want. This is what I get, and this is my code: matplot(x[,1],x[,-1],type='b', xlab = "epsilon_h", ylab = "Value2", xlim=