similar to: Questions about date/time and truncating

Displaying 20 results from an estimated 700 matches similar to: "Questions about date/time and truncating"

2006 Sep 23
2
Question about merge()
If I want to do a join based on *two* matching fields in two data frames, can merge() handle this? It appears to only handle a single matching column -- do I need to make a "metacolumn" or is there some way to do this? E.g.: Dataframe 1 contains columns A,B,C and Dataframe 2 contains A,B,D I want an output A,B,C,D which places C and D together if A and B match (otherwise, make two
2006 Nov 02
2
poly() question
Besides the primary citation, "Kennedy, W. J. Jr and Gentle, J. E. (1980) Statistical Computing Marcel Dekker." (which is $300 and my library doesn't have it), is there any other documentation on how to take a poly() object and predict "by hand" new data? E.g. What do those coefficients actually mean ("The orthogonal polynomial is summarized by the coefficients, which
2006 Sep 23
3
Data frames questions
Hi there, couple of questions on data frames: 1) Is there a way to build an empty data frame, containing nothing but the data frame variable names? 2) Is there a way to reorder the variables in a data frame, e.g. When I go to write out a data frame using write.table or write.matrix, I want the output in a certain order... 3) How to I "append" to the bottom of a dataframe? Thanks! --j
2007 Aug 04
2
Problems using "lm" in combination with "predict"
Hello everybody, I'm trying to predict a linear regression model but it does not work. My Model: y = Worktime + Vacation + Illnes + Bankholidays My modelmatrix is of dimension 28x4 Then I want to make use of the function predict because there confidence.intervals are include. My idea was: mod <- lm(y~Worktime+Vacation+Illnes+Bankholidays) newdate=data.frame(x=c(324,123,0.9,0.1))
2006 May 10
3
Contour plot overlayed with line plot
I apologize for what may be a newbie question: I have two sets of data, one is X,Y,Z data that I'd like to make a contour plot of (Z defining the contours), and a second set of X,Y data (Y as a function of X) which I would like made into a line plot OVERLAYED on the contour plot (X and Y from both plots are in the same units and will have overlapping values). Any suggestions on how to do this
2004 May 26
2
Subtracting number of days from a date
Hi group, suppose I have a date, say May 15 2004, and I want to now what date it is 23 days before that date. The way to calculate the new date should (...) take account of leap years :) In pseudocode: olddate <- "May 15 2004" newdate <- olddate-23 I looked around in POSIXct etc..., maybe I overlooked? Thanks, Maarten
2009 Mar 11
1
Is this a documentation bug? Spss dates import
Hello R-user bug seekers are needed! In order to perform these simple tasks you have to use a copy of SPSS and obviously R. The problem is that date conversion of data coming from SPSS gives wrong results, if we follow ?as.POSIXct ## SPSS dates (R-help 2006-02-17) z <- c(10485849600, 10477641600, 10561104000, 10562745600) as.Date(as.POSIXct(z, origin="1582-10-14",
2023 Nov 03
1
Sum data according to date in sequence
Is this what you are after? library(tidyverse) library(lubridate) input <- structure(list(StationName = c("PALO ALTO CA / CAMBRIDGE #1", "PALO ALTO CA / CAMBRIDGE #1", "PALO ALTO CA / CAMBRIDGE #1", "PALO ALTO CA / CAMBRIDGE #1", "PALO ALTO CA / CAMBRIDGE #1", "PALO ALTO CA / CAMBRIDGE #1", "PALO ALTO CA / CAMBRIDGE
2009 Aug 27
19
Best R text editors?
Quick informal poll: what is everyone's favorite text editor for working with R? I'd like to hear from people who are using editors that have some level of direct R interface (e.g. Tinn-R, Komodo+SciViews). Thanks! --j -- Jonathan A. Greenberg, PhD Postdoctoral Scholar Center for Spatial Technologies and Remote Sensing (CSTARS) University of California, Davis One Shields Avenue The
2009 Mar 18
2
How do I set the Windows temporary directory in R?
I'm trying to redirect where temporary files go under R to D:\temp\somerandomname from its default (C:\Documents and Settings\username\Temp\somerandomname) -- how do I go about doing this? --j -- Jonathan A. Greenberg, PhD Postdoctoral Scholar Center for Spatial Technologies and Remote Sensing (CSTARS) University of California, Davis One Shields Avenue The Barn, Room 250N Davis, CA 95616
2009 Mar 13
2
Using format to add leading zeroes
I have a numerical vector which contains a (poorly) formatted time column, which, in theory, should be HHMM, but was distributed as an integer, so, for 12:15 am, it is saved as "15" (e.g. HHMM = 0015 with the zeroes stripped). I'm trying to use this in conjunction with strptime, but I'm thinking because each time is an integer ranging from 1 to 4 digits, I probably need to
2009 Mar 08
2
plot confidence limits of a regression line - problem
hi, I don't know what I am doing wrong, but with that code; x1 <- c(1.60, 0.27, 0.17, 1.63, 1.37, 2.00, 0.90, 1.07, 0.89, 0.43, 0.37, 0.59, 0.47, 1.83, 1.79, 0.90, 0.72, 1.83, 0.23, 1.97, 2.03, 2.19, 2.03, 0.86) x2 <- c(1.30, 0.24, 0.20, 0.50, 1.33, 1.87, 1.30, 0.75, 1.07, 0.43, 0.37, 0.87, 1.40, 1.37, 1.63, 0.80, 0.57, 1.60, 0.39, 2.03, 1.90, 2.07, 1.93, 0.93) model <-
2013 Jan 18
2
A smart way to use "$" in data frame
Hello all, I have a data frame dataa: newdate newstate newid newbalance newaccounts 1 31DEC2001 AR 1 1170 61 2 31DEC2001 VA 2 4565 54 3 31DEC2001 WA 3 2726 35 4 31DEC2001 AR 3 2700 35 The following gives me the balance of state AR:
2006 Jul 06
6
Help with overriding / overwriting date values in ActiveRecord to accept Euro Style Date from a Textbox
Hi guys, I''m trying to make an AR model which accepts a string data (from a text input) in euro date format eg <input .... value = "23/01/2006"> ( 23 Jan 2006) Reading the example from RDoc... i tried to overwrite/overload/override the = function to write in the date.. Cant get it to work because .. i dont knoe what format should it accept.. i''ve tried
2009 Jun 16
2
Statistically detecting thresholds...
Rers: I have some ecological data (stream velocity vs. % cover of submerged weeds) that shows strong evidence of a thresholding step-function, e.g. below some velocity, % cover ranges from 0% to 100% (with no apparent relationship to velocity within this range of velocities), but above a certain "threshold" velocity, the % cover does not appear to exceed, say, 10%. There are good
2009 Apr 07
1
Constrained, multiple response statistics
R'ers: I was hoping I could get some direction on this. I have a dataset of the form: Y1,Y2,...,YM = f(X1,X2,...,XN), where N is >>> M The response data (Y1,Y2,...,YM) is frequency data, such that the sum of all Yi = 1.0. Both Xj and Yi are continuous variables. I'm trying to figure out the best approach(es) to solving for the model f() -- any ideas? I could solve
2009 Jul 01
3
"Error: cannot allocate vector of size 332.3 Mb"
Dear R-helpers, I am running R version 2.9.1 on a Mac Quad with 32Gb of RAM running Mac OS X version 10.5.6. With over 20Gb of RAM "free" (according to the Activity Monitor) the following happens. > x <- matrix(rep(0, 6600^2), ncol = 6600) # So far so good. But I need 3 matrices of this size. > y <- matrix(rep(0, 6600^2), ncol = 6600) R(3219) malloc: ***
2009 Jul 06
7
Testing memory limits in R??
Hello Everyone, We have recently purchased a server which has 64GB of memory running a 64bit OS and I have compiled R from source with the following config ./configure --prefix=/usr/local/R-2.9.1 --enable-Rshlib --enable-BLAS-shlib --enable-shared --with-readline --with-iconv --with-x --with-tcktk --with-aqua --with-libpng --with-jpeglib and I would like to verify that I can use
2009 Jan 25
2
.Renviron for multiple hardwares...
Our lab has a lot of different unix boxes, with different hardware, and I'm assuming (perhaps wrongly) that by setting a per-user package installation directory, the packages will only work on one type of hardware. Our systems are all set up to share the same home directory (and, thus, the same .Renviron file) -- so, is there a way to set, in the .Renviron file, per-computer or
2007 Jul 05
1
(no subject)
I'm trying to hunt down an appropriate kriging package for my specific application, and I was hoping someone on the R list might have some pointers -- I'm interested in performing kriging and related spatial interpolations with one of the R packages, but I need to be able to provide my own point-to-point distances (e.g. I do not want to use standard between point distances, as calculated