similar to: Decimals in R/SQL

Displaying 12 results from an estimated 12 matches similar to: "Decimals in R/SQL"

2011 Aug 02
1
density plot for weighted data
I'm trying to create a density plot using census data, where the weights don't sum to 1. >plot(density(oh$FINCP,weights=oh$PWGTP)) Warning message: In density.default(oh$FINCP, weights = oh$PWGTP) : sum(weights) != 1 -- will not get true density How would I go about doing this? Thanks!
2010 Nov 15
5
How to Read a Large CSV into a Database with R
Hi, I'm working in R 2.11.1 x64 on Windows x86_64-pc-mingw32. I'm trying to insert a very large CSV file into a SQLite database. I'm pretty new to working with databases in R, so I apologize if I'm overlooking something obvious here. I'm trying to work with the American Community Survey data, which is two 1.3GB csv files. I have enough RAM to read one of them into memory,
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 Mar 09
2
SQLDF - Submitting Queries with R Objects as Columns
Fellow R programmers, I'd like to submit SQLDF statements with R objects as column names. For example, I want to assign "X" to "var1" (var1<-"X") and then refer to "var1" in the SQLDF statement. SQLDF needs to understand that when I reference "var1", it should look for "X" in the dataframe. This is necessary because my SQLDF
2003 Nov 14
1
plotmath problems with X11 fonts (Redhat 9)
We've only switched from redhat 7.3 to 9 several weeks ago, and I found today, that the last three pages of demo(plotmath) uses quite wrong plot symbols, e.g sum(....) 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
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
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
2004 May 14
3
type checking --- just a thought
hi: would it be useful to build into R an optional mechanism that typechecks 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
2006 Jul 27
6
Any interest in "merge" and "by" implementations specifically for sorted data?
Hi Developers, I am looking for another new project to help me get more up to speed on R and to learn something outside of R internals. One recent R issue I have run into is finding a fast implementations of the equivalent to the following SAS code: /* MDPC is an integer sort key made from two integer columns */ MDPC = (MD * 100000) + PCO; /* sort the dataset by the key */ PROC SORT;
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
2006 May 19
1
Writing to a file with fixed precision
Dear R users; A follow-up question regarding writing to a file with fixed precision: Assuming for each column of x, I would like to have a different format, then I modify the code as: x.fmt <- apply(x, 1, function(x) sprintf("%.14f %.10f %2.5f", x)) where three different formats are %.14f %.10f %2.5f. The error message I got is "Error in sprintf(fmt, ...) : too few
2005 Oct 10
1
Writing to a file with fixed precision
Hi, I'm trying to ouput to a filled with a fixed precision: eg. if I have data x=c(1.0,1.4,2.0), I want to be able to ouput the following to a file: 1.00000000000000 1.40000000000000 2.00000000000000 I was wondering if there was a function to do this in R? Thanks, Richard Richard Hedger Département de Biologie Université Laval Québec, Canada, G1K 7P4 [[alternative HTML version deleted]]