search for: xsum

Displaying 10 results from an estimated 10 matches for "xsum".

Did you mean: sum
2003 Nov 14
1
plotmath problems with X11 fonts (Redhat 9)
...m(....) gives (+) {+ in circle} instead of the Sigma-like summation --- but only in "text" not in title, i.e., probably a font problem. With postscript() {and hence dev.print() of x11()} all is fine. Hence it must be an X font server problem of some kind. Here is a reproducible example: xsum <- expression(sum(x[i], i = 1, n)) plot(1.1, main=xsum, xlab=xsum, ylab=xsum) text(1,1,xsum) which produces the graphic that I attach. If you can try this yourself _and_ if you see the same effect, could you tell me (or us) what OS / setup / ... you are using? Could R try better to get prope...
2011 Mar 09
2
SQLDF - Submitting Queries with R Objects as Columns
...ger function that I call that repeatedly with different column names. Code below... thank you in advance! Mike library(sqldf) testdf<-data.frame(c(1,2,3,4,5,6,7,8,9,10),c(1,1,1,2,2,2,3,3,3,3)) names(testdf)<-c("X","Y") # Works as intended sqldf("select sum(X) as XSUM, Y as Y from testdf group by Y") # Now... can I reference var1 in the code? var1<-"X" # Unsuccessful Atteps sqldf("select sum(var1) as XSUM, Y as Y from testdf group by Y") sqldf("select sum(get(va...
2004 Aug 24
5
MMX/mmxext optimisations
quite some speed improvement indeed. attached the updated patch to apply to svn/trunk. j -------------- next part -------------- A non-text attachment was scrubbed... Name: theora-mmx.patch.gz Type: application/x-gzip Size: 8648 bytes Desc: not available Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20040824/5a5f2731/theora-mmx.patch-0001.bin
2011 Apr 13
1
Decimals in R/SQL
Hello, When I am writing in sqldf or RSQLite I lose the decimals in my matrix. The only way I can get decimals is by multiplying by 1.00000, etc. I have tried manipulating the options, but it is only effective once I multiply by 1.0000. I appreciate any suggestions! Thanks! Example: z <- sqldf ("select ST, SUM(AGEP*PWGTP)*1.000000000/SUM(PWGTP)*1.00000000000000 as wgtage from ss09
2004 May 14
3
type checking --- just a thought
...hecks arguments? for example, sum.across <- function ( inpmatrix : matrixtype( dim[1]>1, dim[2]>3 ) ) : vector { } # this would define a sum.across function that can take matrices or data sets, but not vectors, # and which indicates that it will return a vector. xsum <- sum.across( 1:10 ); # error repeat <- function( series : vector( dim>0 ), times : scalar( value>0 ) ) : vector; similarly, a common input error condition may be calling a function with a NULL vector, or with a vector with fewer than N observations. many statistical functi...
2006 Jul 27
6
Any interest in "merge" and "by" implementations specifically for sorted data?
...(MD * 100000) + PCO; /* sort the dataset by the key */ PROC SORT; BY MDPC; /* print out count and sum for each unique sort key (subgroup) */ /* use of BY MDPC requires sorting that data set by MDPC first in SAS */ PROC UNIVARIATE NOPRINT; VAR MVE; BY MDPC; OUTPUT OUT=TMP0 N=XN SUM=XSUM; Easy to do in R but the problem is the data set this is being run on has 1,742,201 lines in it and takes up 196,868,713 bytes to store as character data. The sort key has easily has over 200,000 unique keys (if not twice that). My first R attempt was a simple # sort the data.frame gd and...
2010 Jan 15
1
How to calculate the row wise means for grouped columns in matrix?
Hi all, I want to calculate the row wise mean of groups of columns in a matrix M. All columns belonging to the same group have the same column name. My idea is to create a new vector V containing these column names, but after first removing the duplicates. Then I would calculate the means using for instance rowMean() and by comparing the column names of M with the vector V, getting the indices
2004 Sep 15
1
Theora mcomp tuning...
...ogg_uint32_t GetInterErr (const unsigned char * NewDataPtr, + const unsigned char * RefDataPtr1, + const unsigned char * RefDataPtr2, + ogg_uint32_t PixelsPerLine ) { ogg_uint32_t i; ogg_int32_t XSum=0; ogg_int32_t XXSum=0; @@ -204,23 +204,29 @@ return (( (XXSum<<6) - XSum*XSum )); } -static ogg_uint32_t GetSumAbsDiffs (unsigned char * NewDataPtr, - unsigned char * RefDataPtr, - ogg_uint32_t PixelsPerLine, -...
2011 Jun 19
4
For loop by factor.
I have a data.frame as follows: a 3 a 2 a 1 b 3 b 2 c 2 c 3 c 1 c 1 Each factor (a, b, c) should be monotonically decreasing, notice that factor 'c' is not. I could use some help to figure out how to form a logical structure (mostly just syntax), that will check each 'next value' for each factor to see if it is less than the previous value. If it is less than the
2003 Aug 13
2
rowsum() may return a vector instead of a matrix (PR#3737)
If all rows are in the same "group", rowsum() returns a vector instead of a (1xN) matrix, contrary to documentation: R> print(z <- rowsum(matrix(1:12, 3,4), rep("x",3))) [1] 6 15 24 33 R> dim(z) NULL It worked correctly in version 1.4.0 but was broken by version 1.6.1. I'm currently using 1.7.1 under Solaris 2.8. --please do not edit the information