similar to: RSQLite - How to express(or save) a dataframe as an output?

Displaying 20 results from an estimated 600 matches similar to: "RSQLite - How to express(or save) a dataframe as an output?"

2012 Mar 27
1
RSqlite UPDATE command problem
All: I am using RSqlite and want to be able to update individual values in a record, such as with this simple example: library(RSQLite) drv<-dbDriver("SQLite") con<-dbConnect(drv,"test.db") my.data<-data.frame(countries=c("US","UK","Canada","Australia","NewZealand"),vals=c(52,36,74,10,98))
2010 Sep 05
1
Greek symbols (again but more complicated)
Hi. I'm trying to get 'mu' to show up as a Greek symbol but, despite trying every example I could find, can't get it to work. Any insights would be welcome. This is what I'm using that works, but displays mu with the letter u. plotTimeXMastPAR <- qplot(DT,MastPAR, data=A, xlab = "", ylab = quote(PAR (uE ~m^-2 ~s^-1)), geom="line") +
2011 Feb 28
1
Data type problem when extract data from SQLite to R by using RSQLite
Hi there, When I extract data from SQLite to R, the data types (or modes) of the extracted data seems to be determined by the value of the first row. Please see the following example. When I put the missing values first, the column extracted is of the mode character. > str(dbGetQuery(sql.industry, + "select pya_var from annual_data3 + order by
2015 Jun 21
2
Trying to re-install ZFS drivers
What should have been a routine upgrade to ZFS 0.6.4.1-1.el6.x86_64 somehow failed, and now I've lost access to a 2T raidz2 array. I've tried removing all zfs and related packages (spl*), then starting fresh. For reasons that have have nothing to do with this problem (I don't think), I'm still booted to kernel 2.6.32-431.29.2.el6.x86_64, and there are no other kernels installed.
2004 Feb 19
1
piece wise application of functions
Dear all, After struggling for some time with *apply() and eva() without success, I decided to ask for help. I have 3 lists labeled with, each contains 3 different interpolation functions with identical names: > names(missgp0) [1] "spl.1mb" "spl.2mb" "spl.5mb" > > names(missgp1) [1] "spl.1mb" "spl.2mb" "spl.5mb" > >
2007 Aug 30
1
Barplot2 using for loop, how to adjust margins?
Hi R-users, I inted to make multiple plots using for loop. The question is how can I adjust the left hand side margin of the plot according to the names.arg argument in barplot2. In every plot I have different annotations in the y axis and they vary in length. Now when I have fixed margins opar <- par(mar=c(3,15,0,2)... I get the same margins in all of the plots. That leaves lots of white
2010 Jan 18
3
Using the output of strsplit
I successfully combined my data frames, and am now on my next hurdle. I had combined the data and quarter, and used tapply to count the entries for each unique date/quarter pair. ar= tapply(ewrgnd$gw, list(ewrgnd$dq), sum) #for each date/quarter combination sums the gw (which are all 1) dq=row.names(ar) spl=strsplit(dq) But I need to split them back into the separate date and quarter. So I used
2005 Jul 20
2
.spl files
I am not certain that this is the right place to post this, but maybe some kind soul can point me in the right direction if not. And I apologize if this is the wrong spot...The reason I posted here is that I recall running across a syslinux changlog that said "..added support for reading .spl..." files. I want to customize the suse boot up splash screens (for a CD install). I have been
2002 Nov 25
2
Pspline smoothing
Dear all, I'm trying to use the Pspline add-on package to fit a quintic spline (norder =3), but I keep running into a Singularity error. > traj.spl <- smooth.Pspline(time, x, norder=3 ) Error in smooth.Pspline(time, x, norder = 3) : Singularity error in solving equations > Playing around with the other parameters produces an "unused arguments" error: > traj.spl
2009 May 24
2
how to implement a circular buffer with R
Some wavelet analysis experts have implemented periodic boundary conditions for signals. I need to implement a circular buffer. Something like: "12345abcdefgh12345abcdefgh" so that at each step the riightmost element is moved to the leftmost index and everything else is properly shifted: "h12345abcdefgh12345abcdefg", "gh12345abcdefgh12345abcdef", .... My
2010 Apr 02
4
Derivative of a smooth function
Dear All, I've been?searching for?appropriate codes to compute the rate of change and the curvature?of ?nonparametric regression model whish was denoted by a smooth function?but?unfortunately?don't manage to?do?it. I presume that such characteristics from a smooth curve can be determined by the first and second derivative operators. The following are the example of fitting a
2009 Jul 05
2
integrar resultado de splines cubicos
hola soy nuevo usuario de R y necesito crear un objeto p tal que, p=lambda*integral[f´´(x)^2 dx ] donde "lambda" es uno de los parametros que resultan de la funcion "smooth.spline()" y la integral es sobre la derivada 2 de esa misma funcion... dos cuestiones: 1) como extraigo lambda de los resultados de smooth.spline() para usarlo como objeto cuando lo requiera y 2) como
2009 Sep 08
1
Character manipulation using "strsplit" & vectorization
Dear R users, Suppose I have a data set with inconsistent names for a field. I desire to make these to consistent names. i.e "University of New Jersey", "New Jersey Uni", "New Jersey University" (3 different inconsistent names) to "The University of New Jersey" (consistent name) Below are arbitrary data set produced from "state.name" (built
2009 Nov 02
4
Incremental ReadLines
I've been trying to figure out how to read in a large file for a few days now, and after extensive research I'm still not sure what to do. I have a large comma delimited text file that contains 59 fields in each record. There is also a header every 121 records This function works well for smallish records getcsv=function(fname){ ff=file(description = fname) x <- readLines(ff)
2007 Sep 05
1
How to extract part of an array?
Hi, How can I extract part of an array? I would like to extract table Supported from this array. If this is not possible, how do I convert array to list? I'm sorry this is not an reproducible example. > spl <- tapply(temp$var1, list(temp$var2, temp$var3, temp$var3), mean) > spl , , Supported 07 08 A 68.38710 71.48387 B 21.67742 20.83871 C
2011 Oct 14
1
Multi t tests
hi all I have R object look like this: > spl $SB012XSB044 DPW Cross 1 66.6 SB012XSB044 2 96.5 SB012XSB044 3 78.8 SB012XSB044 4 68.6 SB012XSB044 5 62.0 SB012XSB044 6 72.1 SB044XSB012 7 72.2 SB044XSB012 8 69.6 SB044XSB012 9 87.9 SB044XSB012 10 84.4 SB044XSB012 11 51.9 SB044XSB012 12 65.5 SB044XSB012 $SB012XSB099 DPW Cross 13 100.9 SB012XSB099 14 44.4 SB012XSB099
2008 Aug 07
1
recursive root finding
Dear list, I've had this problem for a while and I'm looking for a more general and robust technique than I've been able to imagine myself. I need to find N (typically N= 3 to 5) zeros in a function that is not a polynomial in a specified interval. The code below illustrates this, by creating a noisy curve with three peaks of different position, magnitude, width and
2012 May 02
2
Problem with 'nls' fitting logistic model (5PL)
Dear R-Helpers, I'm working with immunoassay data and 5PL logistic model. I wanted to experiment with different forms of weighting and parameter selection, which is not possible in instrument software, so I turned to R. I am using R 2.14.2 under Win7 64bit, and the 'nls' library to fit the model - I started with the same model and weighting type (1/y) as in the instrument to see
2011 Sep 20
2
Multivariate spline regression and predicted values
Hello, I am trying to estimate a multivariate regression of Y on X with regression splines. Y is (nx1), and X is (nxd), with d>1. I assume the data is generated by some unknown regression function f(X), as in Y = f(X) + u, where u is some well-behaved regression error. I want to estimate f(X) via regression splines (tensor product splines). Then, I want to get the predicted values for some new
2006 May 03
4
Aggregate?
Hello, I have a data set with a grouping variable (TRIPID) and several other variables. TRIPID is repeated in some areas and I would like to use a function like aggregate to sum the variable UNITS according to TRIPID. However I would also like to retain the other variables as they are in the data set with the new summed TRIPID. So what I have is something like this: YEAR MONTH DAY