search for: by1

Displaying 7 results from an estimated 7 matches for "by1".

Did you mean: by
2013 Mar 15
5
Data manipulation
Hello all, I would appreciate your thoughts on a seemingly simple problem. I have a database, where each row represent a single record. I want to aggregate this database so I use the aggregate command : D<-read.csv("C:\\Users\\test.csv") attach(D) by1<-factor(Class) by2<-factor(X) W<-aggregate(x=Count,by=list(by1,by2),FUN="sum") The results I get following the form: >W Group.1 Group.2 x 1 1 0.1 4 2 2 0.1 7 3 3 0.1 1 4 1 0.2 3 5 3 0.2 4 6 3 0.3 4...
2004 Aug 15
3
Stacking Vectors/Dataframes
...re a simple way of stacking/merging two dataframes in R? I want to stack them piece-wise, not simply add one whole dataframe to the bottom of the other. I want to create as follows: x.frame: aX1 bX1 cX1 ... zX1 aX2 bX2 cX2 ... zX2 ... ... ... ... ... aX99 bX99 cX99 ... zX99 y.frame: aY1 bY1 cY1 ... zY1 aY2 bY2 cY2 ... zY2 ... ... ... ... ... aY99 bY99 cY99 ... zY99 new.frame: aX1 bX1 cX1 ... zX1 aY1 bY1 cY1 ... zY1 aX2 bX2 cX2 ... zX2 aY2 bY2 cY2 ... tY2 ... ... ... ... ... aX99 bX99 cX99 ... tX99 aY99 bY99 cY99 ... tY99 I have tried to use a for loop (simply...
2006 Oct 12
2
adding error bars to lattice plots
...", "lower", "upper") singer.ucl$voice.part <- factor(rownames(singer.ucl), levels = rownames(singer.ucl)) # add factor, grouping and by variables singer.ucl$fac1=c("level1","level1", "level2", "level2") singer.ucl$by1=c("two","one") singer.ucl$group1=c(rep(letters[1],4),rep(letters[2],4)) ## show the data frame singer.ucl # Deepayan's original example with(singer.ucl, xyplot(voice.part ~ median, lx = lower, ux = upper, prepanel = prepanel.ci,...
2014 Mar 19
2
Posible error en la documentación de "aggregate"
Hola compañeros, estaba utilizando la función "aggregate" y quería que tuviese en cuenta los NAs. He leido la documentación de dicha función y aparece esto: # and if you want to treat NAs as a group fby1 <- factor(by1, exclude = "") fby2 <- factor(by2, exclude = "") aggregate(x = testDF, by = list(fby1, fby2), FUN = "mean") (http://stat.ethz.ch/R-manual/R-patched/library/stats/html/aggregate.html) Pero el argumento exclude de la función factor, para que tenga e...
2004 Aug 06
2
optimization possible?
hi, i did some tests about performance in jspeex ... uls@mainframe:~/eclipse/avrelay$ java TestClient Diff1: 0 10 Diff2: 141 started. uls@mainframe:~/eclipse/avrelay$ <p>{ SpeexEncoder e1=new SpeexEncoder(); e1.init(0,1,44100,1); byte[] by1=new byte[320]; long l1=System.currentTimeMillis(); long l2=System.currentTimeMillis(); System.out.println("Diff1: "+(l2-l1)); e1.processData(by1,0,by1.length); System.out.println(e1.getProcessedDataByteSize()); l2=System.currentTimeMillis(); System.out.println(...
2007 Sep 27
3
Aggregate factor names
Hi all, A suggestion derived from discussions amongst a number of R users in my research group: set the default column names produced by aggregate () equal to the names of the objects in the list passed to the 'by' object. ex. it is annoying to type with( my.data ,aggregate( my.dv ,list( one.iv = one.iv ,another.iv = another.iv ,yet.another.iv = yet.another.iv )
2006 Oct 03
1
HP Toolbox kills Samba
...H5/IG8# =P``=H-#0:&FVQ&DW;7*/1\,G$9CB `SA8 M&@>#QOEQHW8Y:/>[C?/V1KS$#28^[=5WMO9_W'[Q<F=[K:1B_.'CW[9:YYUN M9S#L-X:]_E%W$&-:J]<<Q'?*A\]E4*//&C_^Z.7?%_+HQ$8D)Y)S7LGIA6)8 MD!"#U( #.( #)">2$\F)Y%RBY'3"JAS)28A!:L !', !DA/)B>1$<BY1<D:[ M"B0G(0:I`0=P``=(3B0GDA/)N43)Z;5&<A)BD!IP``=PP'H;X$&CI:71O'#. MH='PR<1F.( #.$"C`0\:+2V-IGT@6Q"?3&R&@P5R,.@UW[>'JV]>U$>3<?%) M]YZ]JA\<1B.^+DPSQD&SU^T67K:HKT;]I''>.?NXN77]X8O&\'1SI?9;HU_K M7W9K&]U!LU...