search for: testdfr

Displaying 2 results from an estimated 2 matches for "testdfr".

Did you mean: testdf
2009 Feb 26
2
interpSpline with dates?
Dear R-helpers, can I use a POSIXct date as the x variable in interpSpline? The help page says x and y need to be numeric... is there a workaround? example: library(splines) testdfr <- data.frame(Date=seq(as.POSIXct("2008-08-01"),as.POSIXct("2008-09-01"), length=10)) testdfr$yvar <- rnorm(10) sp <- interpSpline(yvar ~ Date, testdfr) preddfr <- data.frame(Date=as.POSIXct("2008-08-02")) predict(sp, preddfr) thanks, Remko -----------...
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.