similar to: interpSpline with dates?

Displaying 20 results from an estimated 800 matches similar to: "interpSpline with dates?"

2009 Jul 23
2
Assigning rank based on total count
Hi all, I am using ACS micro data (PUMS) with one of the columns as a factor for the place of birth (POBPF). I would like to create a column (POBR) containing a rank corresponding to the place of the observation in the POBPF rankings. For example, if a person is from Oregon, Oregon is the most popular Place of Birth, so each person who came from Oregon should have a 1 in their POBR.
2011 Sep 06
2
Sweave : some comments disappear
Dear R-helpers, when I have an R code chunk in a sweave file like this: <<>>= x <- 1:10 # this comment disapears x # this one does not! print(x) #mean mean(x) @ The first comment does not appear in the sweaved document, the second one does. How can this be? I have tried print=TRUE and keep.source=TRUE, but neither seem to affect this behavior. thanks, Remko
2009 Aug 19
2
RGoogleDocs/RCurl through proxy
Dear list, I am trying to use RGoogleDocs, but I am connecting through a proxy server. I know RCurl is used for the connection, which should be able to deal with proxies and such. How do I set this up for RCurl? And can I use those settings with RGoogleDocs as well? I have the name of the proxy server and the port number. (Windows XP). thanks, Remko
2010 Jun 02
2
Faster union of polygons?
Dear R-helpers, thanks for yesterday's speeding-up tip. Here is my next query: I have lots of polygons (not necessarily convex ones, and they never have holes) given by x,y coordinates. I want to get the polygon that is the union of these polygons. This is my current method, but I am hoping there is a faster method (up to thousands of polygons, each with ca. 40 xy points). Example:
2009 Feb 13
2
Running examples failed (but there are none).
Dear R-helpers, making a package (windowsXP), that includes a bunch of functions, but none have examples (all example code is within \dontrun{} blocks). I do R CMD check Maeswrap, all bits get OK-ed, except: "Running examples in 'Maeswrap-Ex.R' failed." When I run the 'Maeswrap-Ex.R' file myself, there are no problems. Any pointers? thanks Remko
2011 Jun 28
2
gam confidence interval (package mgcv)
Dear R-helpers, I am trying to construct a confidence interval on a prediction of a gam fit. I have the Wood (2006) book, and section 5.2.7 seems relevant but I am not able to apply that to this, different, problem. Any help is appreciated! Basically I have a function Y = f(X) for two different treatments A and B. I am interested in the treatment ratios : Y(treatment = B) / Y(treatment = A) as
2009 Apr 24
1
Box-counting dimension and package 'fdim'
Dear R-helpers, I am looking for an implementation of the box-counting algorithm to estimate the box dimension of a cloud of points in 3D (aka fractal dimension, or similarity dimension). The package 'fdim' might be doing this, but the documentation is awful and I don't understand what is what there. Does anyone know of an implementation of this algorithm in R, or elsewhere, or
2009 Jul 20
1
Problem with as.POSIXct on dates object
Dear R-helpers, I have a problem converting an object made with the 'chron' function to a POSIXct object: # Make date based on DOY dat <- chron(dates=232, origin.=c(month=1, day=1, year=2008)) dat #[1] 08/20/08 # Converting to POSIXct uses current timezone (Sydney): as.POSIXct(dat) #[1] "2008-08-20 10:00:00 EST" # Setting GMT timezone has no effect? as.POSIXct(dat,
2010 Mar 30
1
SHLIB not working (Win Vista)
Dear R-helpers, I tried to build a DLL like I have done so many times, but this time on my new machine, but it gives the erorr: (from cmd window) >R CMD SHLIB Boxcnt.f MAKE Version 5.2 Copyright (c) 1987, 2000 Borland Error c:/PROGRA~1/R/R-210~1.1/share/make/winshlib.mk 4: Command syntax error *** 1 errors during make *** The error is not in my Fortran file, because I also tried other files
2009 Oct 20
1
system() or shell() with python script
Hi all, I am having some problems calling a python script from R that resides in a folder that is in the path (WindowsXP): > system("quickPadTool.py") Warning message: In system("quickPadTool.py") : quickPadTool.py not found # I also tried 'shell' (and shell.exec as well). > shell("quickPadTool.py") 'quickPadTool.py' is not recognized as an
2010 Oct 19
1
DLL not found
Dear R-helpers, I have a fresh installation of windows vista, and R 2.12.0 (session info below). Problem: > require(sp) Loading required package: sp Error in library.dynam(lib, package, package.lib) : DLL 'lattice' not found: maybe not installed for this architecture? > require(lattice) Loading required package: lattice Failed with error: ?package 'lattice' is not
2010 Oct 25
2
R-Fortran question (multiple subroutines)
Dear R-helpers, apologies if this is somewhere in a manual, I have not been able to find anything relevant. I run Windows Vista. I have some Fortran code in a subroutine, and have no problem calling this from R with .Fortran, compiling the code either with 'R CMD SHLIB' or independently with gfortran. But is it possible to have more than one subroutine in my source file, one depending
2009 Dec 01
4
Is there a function to test if all the elements in a vector are unique
length(unique(c(1,2,2)))==length(c(1,2,2)) I use the above test to test if all the elements in a vector are unique. But I'm wondering if there is a convenient function to do so in R library.
1998 Apr 07
3
R-beta: spline problems(?)
Hi, I am a total beginner with this whole thing so please have patience! I am trying to run an S-plus program with a certain line: spline(1:nrow(y), y[,1],n=100); This crashes with: Error: NAs in foreign function call (arg 8) Apparently, this is caused by the last command of spline: u <- seq(xmin, xmax, length.out = n) .C("spline_eval", z$method, length(u), x = u, y =
2009 Jan 22
2
plot: abline() - define line length
Hi, is there a way to define, that a line drawn via abline() should only go from for example -2 to 1 on the x-axis (with something working similiar to xlim()) ? thanks for any help!
2009 Feb 13
3
R Help
Hi, I have a list of numbers (classified as a list) that contains integer(0) empty vectors. How do I convert those integer(0) into NAs? Thanks [[alternative HTML version deleted]]
2009 Aug 04
1
Build a dataframe row by row?
Hi, Time for another of my "newbie" questions. Is it possible to build up a data.frame "row by row" as I go I'm going to be running a bunch of experiments (many in a loop) to test different things. I'm using AUC as my main performance measure. My thought was to add a row to a data.frame for each iteration and then have a nice summary report at the end. I found
2009 Dec 01
1
vector as data.frame element?
It seems that an vector or other non elemental data type can not be assigned to an element in the data.frame. I'm wondering what is the walk around. > li=data.frame(a=c(0,1), b=c('x','y')) > li$b[[1]]= 'x' > li$b[[2]]<- c('y','z') Error in li$b[[2]] <- c("y", "z") : more elements supplied than there are to replace
2009 Nov 09
1
Print methods
I've built a package that contains only two functions for a test run. They are: g <- function(x){ x <- x^2 class(x) <- "foo" x } print.foo <- function(x, ...){ cat("This is a test:\n") cat(x, "\n") invisible(x) } Simply testing these functions in the R workspace prior to a build yields: > g(1:5) This is a test: 1 4 9 16 25 Now, I
2009 Jan 26
1
Goodness of fit for gamma distributions
I'm looking for goodness of fit tests for gamma distributions with large data sizes. I have a matrix with around 10,000 data values in it and i have fitted a gamma distribution over a histogram of the data. The problem is testing how well that distribution fits. Chi-squared seems to be used more for discrete distributions and kolmogorov-smirnov seems that large sample sizes make it had to