similar to: Which date format to choose?

Displaying 20 results from an estimated 6000 matches similar to: "Which date format to choose?"

2011 Sep 16
3
Help writing basic loop
Hello, I would like to write a loop to 1) run 100 linear regressions, and 2) compile the slopes of all regression into one vector. Sample input data are: y1<-rnorm(100, mean=0.01, sd=0.001) y2<-rnorm(100, mean=0.1, sd=0.01) x<-(c(10,400)) #I have gotten this far with the loop for (i in 1:100) { #create the linear model for each data set model1<-lm(c(y1[i],y2[i])~x)
2009 Dec 22
1
as.Date function yields inconsistent results (PR#14166)
Full_Name: Mario Luoni Version: 2.10.0 OS: Windows XP HE SP3 Submission from: (NULL) (217.194.59.134) This piece of code: zzz1 <- as.POSIXct("1999-03-18", tz="CET") zzz2 <- as.POSIXlt("1999-03-18", tz="CET") zzz1 == zzz2 as.Date(zzz1) as.Date(zzz2) yields TRUE for "zzz1==zzz2", but the two dates returned by as.Date are different: >
2004 Sep 03
2
strptime problems
Hi, I'm experiencing a problem with strptime. (R 1.9.1 on a Win2000 machine) I have a large list containing 6 columns and 161800 rows. One column contains dates that I want to convert in order to compare the different dates. Some dates work just fine while others become NA. I don't see any difference between the dates. I've attached an example from my code. Hope this explains my
2009 Jun 18
1
Learning S3
Hi all, Do you know of any good resources for learning how S3 works? I've some how become familiar with it by reading many small pieces, but now that I'm teaching it to students I'm wondering if there are any good resources that describe it completely, especially in a reader-friendly way. So far I've found: *
2011 Oct 09
1
two-dimensional Kolmogorov-Smirnow (2DKS) test
The reference below describes the utility of the two-dimensional Kolmogorov-Smirnow (2DKS) test for detecting relationships in bivariate data. If this test has been implemented in R I would love to know about it! Thanks, jake Garvey, J. E., E.A. Marschall, and R.A. Wright (1998). "From star charts to stoneflies: detecting relationships in continuous bivariate data." Ecology
2007 Apr 05
1
Extent of time zone vulerability for POSIX date and time classes
Hi. I frequently convert date and time data to and from character representations. I'm frustrated with chron, because 'seconds' are required to create a time object (my input data never has seconds). More importantly, I cannot make chron print the format 12/30/2006 (which my output data requires). I really like the format flexibility of strftime() and strptime(), but of course
2011 Oct 12
4
R and Forex
Hi all, I recently started learning about Forex and found this O'Reilly book in Barnes & Nobles about R. I bought it out of pure curiosity. I like what I see. However, I have a question. Has anyone tried to bring these two ideas together in a financial and trading sense? Are there any libraries or modules in R that can aid in this venture? --Yves [[alternative HTML version
2008 Feb 16
3
Arithmetic bug? (found when use POSIXct) (PR#10776)
Full_Name: Bo Zhou Version: 2.6.1 (2007-11-26) OS: Windows XP Submission from: (NULL) (207.237.54.242) Hi, I found an arithmetic problem when I'm doing something with POSIXct The code to reproduce it is as follows (This is the recommended way of finding out time zone difference on R News 2004-1 Page 32 URL http://cran.r-project.org/doc/Rnews/Rnews_2004-1.pdf) a=Sys.time()
2010 Feb 11
2
ZOO object colnames refering to Dates
Hello, I have large zoo objects (about 100 or more time series merged next to eachother). Example: X05.Oct.99 X05.Nov.99 X05.Dec.99 X05.Jan.00 X05.Feb.00 X05.Mar.00 X05.Apr.00 X05.May.00 X05.Jun.00 [1,] 5649.3 5679.4 5679.4 5679.4 5679.4 5679.4 5679.4 5679.4 5679.4 [2,] 5682.7 5719.2 5719.2 5719.2 5719.2 5719.2 5719.2
2006 Jan 01
4
S3 vs. S4
Dear R People: Could someone direct me to some documentation on the difference between S3 and S4 classes, please? For example, why would a person use one as opposed to another? Maybe pros and cons of each? Thanks in advance! R Version 2.2.0 (I'm downloading the new one this afternoon!) Windows. Happy New Year! Sincerely, Erin Hodgess Associate Professor Department of Computer and
2015 Nov 04
1
setOldClass("xts")
Hello, I apologize that I am cross posting here after getting no answer from my initial question on stack overflow <http://stackoverflow.com/questions/33492601/r-setoldclass-only-if-needed>. I should certainly have posted it first here.. I am using 3 packages: - xts - quantmod - 'myPackage' quantmod is creating a union class by doing: setOldClass("xts");
2004 Aug 17
3
Fwd: strptime() problem?
Hi all; I've already send a similar e-mail to the list and Prof. Brian Ripley answered me but my doubts remain unresolved. Thanks for the clarification, but perhaps I wasn't clear enough in posting my questions. I've got a postgres database which I read into R. The first column is Timestamp with timezone, and my data are already in UTC format. An 'printed' extract of R
2005 Nov 29
2
qcc
violating.runs I read from the news cran.r-project.org/doc/Rnews/Rnews_2004-1.pdf that the criteria for the violating is 5 but 1)I cannot find "5" in the code of the function. Where is the "5" ? 2)What is the easiest way to change it ? 3)Is there any more criterias made somewhere ? Yours sincerelly, Tommi Viitanen
2004 Oct 20
2
R & Graphs
Dear R-users, I'm finding for a R-package concerning graphs. Is there some kind of that package? I've a set of correlation coeffients between several variable and I wish to built a graph to link variables correlated. Many thanks. Best, Vito ===== Diventare costruttori di soluzioni "The business of the statistician is to catalyze the scientific learning process." George
2009 Apr 21
1
Quality control and possible QC in R book?
Dear R People: Is there a Quality Control in R book that would be accessible for undergraduates, please? I'm teaching a QC course in the fall semester and would be happy to have a Use R book or something like that, please. Thanks in advance, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodgess at
2005 May 27
2
Round a line
R-help, I have lloked in the archives found no answer to how to round the line joint. I have usedthe arguments lnd, ljoin in par but I get no differences in the plotting. x=1:10 par(ljoin="round",lend="round") plot(x,sin(x),type="l",lwd=2) Any suggestions? I run on a Windows XP machine. > version _ platform i386-pc-mingw32 arch
2011 Feb 23
3
Using string to call/manipulate an object
I am using getSymbols function from quantmod package to get price data from internet. Currently I have: my.ticker <- "IBM" getSymbols(my.ticker,src="google") This creates an xts object named my.ticker which contains historical price data for IBM. How can I call and manipulating this xts object using my original string my.ticker? I want to do: colnames(my.ticker) <-
2018 Jan 18
3
Split charts with ggplot2, tidyquant
Could you provide some information on your data structure (e.g., are the two time series in separate columns in the data)? The solution is fairly straightforward once you have the data in the right structure. And I do not think tidyquant is necessary for what you want. Best, Charlie -- Charles Redmon GRA, Center for Research Methods and Data Analysis PhD Student, Department of Linguistics
2016 Apr 06
2
Is this a bug in quantmod::OpCl?
OpCl works on xts objects but not on quantmod.OHLC objects. Is this a bug? Example error: x.Date <- as.Date("2003-02-01") + c(1, 3, 7, 9, 14) - 1 set.seed(1) x <- zoo(matrix(runif(20, 0, 1), nrow=5, ncol=4), x.Date) q <- as.quantmod.OHLC(x,c("Open","High","Low","Close")) # error OpCl(q) #> Error in `colnames<-`(`*tmp*`, value =
2007 Jun 20
2
Computing time differences
Dear R users, I have a problem computing time differences using R. I have a date that are given using the following format: 20080620.00, where the 4 first digits represent the year, the next 2 ones the month and the last 2 ones the day. I would need to compute time differences between two vectors of this given format. I tried around trying to change this format into any type of time serie