similar to: as.Date() clarification

Displaying 20 results from an estimated 50000 matches similar to: "as.Date() clarification"

2007 Apr 18
5
Problem with ?curve
Dear all R gurus, I have following syntax: y = c(1:10) chippy <- function(x) { y[5] = x sin(cos(t(y)%*%y)*exp(-t(y)%*%y/2)) } curve(chippy, 1, 20, n=200) But I am getting error while executing : Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ In addition: Warning message: number of items to
2008 Jan 16
4
Different results in calculating SD of 2 numbers
Hi all, Can anyone tell me why I am getting different results in calculating SD of 2 numbers ? > (1.25-0.95)/2 [1] 0.15 > sd(c(1.25, 0.95)) [1] 0.2121320 # why it is different from 0.15? Regards, Send instant messages to your online friends http://uk.messenger.yahoo.com [[alternative HTML version deleted]]
2010 Mar 10
3
Numeric to Date
Is there easy way to convert numeric to date? For example: If I have, a = as.Date("2010-03-04") And, if run > as.numeric(a) [1] 14672 Is there any function that I can use to convert 14672 back to the date. Thx in advance, Brijesh -------------------------------------------------------------------------- This message w/attachments (message) may be privileged,
2008 Jun 29
3
Interactive plot
Hi all, I have created following codes : mat = cbind(c(0.000059710430,0.000023057380), c(0.000023057380, 0.00005971089)) set.seed = 1000 vary = runif(dim(mat)[1], 2000, 3000) calc = function(mat, vary) { result = vector(length = (length(vary)+1)) result[1] = sqrt(t(vary) %*% vary) for (i in 1 : length(vary)) { result[(i+1)] = sum(vary)*sum(vary*mat[,i])
2011 Jul 17
3
How to convert number (matlab) to date
Hello I am new to R and I need to convert some dates (numeric format by matlab) to actual dates in R. For instance, Matlab -> 730456 -> >> datestr(730456) ans = 02-Dec-1999 R - > library(zoo) > as.Date(730456) [1] "3969-12-03" I don't not mind the output format but it needs to be right. Many thanks Ed
2010 Aug 20
3
Date Inconsistencies? Buglets?
The treatment of dates seems to be a little inconsistent in R 2.11.1 (2010-05-31): [1] The choice of origins? > as.integer(as.Date("1970-01-01")) works and assumes as origin 1970-01-01. However, > as.Date(1) does not work. It requires an origin (as.Date(1, origin="1970-01-01")). If we set a default origin in the former, it should probably work when the input
2009 Jun 16
1
Chron / zoo index problem
Hi all I have an irregular zoo series, where the time index looks like the following: > head(time(l.zoo)) [1] "2009-06-15 01:44:20.802 GMT" "2009-06-15 01:44:20.812 GMT" "2009-06-15 01:44:20.837 GMT" "2009-06-15 01:44:20.848 GMT" "2009-06-15 06:00:01.320 GMT" [6] "2009-06-15 06:00:01.330 GMT" >
2011 Sep 02
2
previous monday date
Hello, I'm attempting to return the date (in form '%Y-%m-%d') of the Monday previous to the current date. For example: since it is 2011-09-02 today, I would expect 2011-08-29 to be the return value. I found the following in: http://www.mail-archive.com/r-help@r-project.org/msg144184.html Start quote from link: prevmonday <- function(x) 7 * floor(as.numeric(x-1+4) / 7) +
2006 Jun 09
2
Date calculation
Dear all R users, Suppose I have a data frame "data" like this: 5/2/2006 36560 5/3/2006 36538 5/4/2006 36452 5/5/2006 36510 5/8/2006 36485 5/9/2006 36502 5/10/2006 36584 5/11/2006 36571 Now I want to create a for loop like this: date = "5/10/2006" for (i in 1: 8) { if (data[i,1] > date) break }
2011 Mar 17
3
date conversion
Dear R People: I have a monthly time series which runs from January 1998 to December 2010. When I use tsp I get the following: > tsp(ibm$ts) [1] 1998.000 2010.917 12.000 Is there an easy way to convert this to a seq.Date object, please? I would like to have something to the effect of 1998/01/01 .... 2010/12/01 Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer
2006 Mar 14
2
Date problem
Hello, I have some "stupid" problems managing "date" data. I have a colomn "date", which I converted from a character representation: for example: a="26/02/06" date=strptime(a,format="%d/%m/%y") For one part of the analysis, I'm interested only in the month and the year, so I did: m.y=strftime(date,format="%m/%y") This returns me
2012 Dec 26
3
Working with date
Hi, Let say I have a date variable: > ?asd <- as.Date("2012-01-03") > asd [1] "2012-01-03" Now, I want to express this date like 3/1/2012. can somebody help me how to achieve that? Thanks,
2006 Jul 11
4
Date Format
Hi everybody, I need your precious help for, I think, a simple request, but I do not manage to solve this. When I use a "table" function with dates in the rows, the rows are coerced to number after the table function. So I need to transform the row names into date format. But I do not manage. Therefore, for an example, I manage to write this : datetest<-"06/01/2001"
2006 Jul 11
4
Date Format
Hi everybody, I need your precious help for, I think, a simple request, but I do not manage to solve this. When I use a "table" function with dates in the rows, the rows are coerced to number after the table function. So I need to transform the row names into date format. But I do not manage. Therefore, for an example, I manage to write this : datetest<-"06/01/2001"
2012 Mar 01
3
Standard variance / devistion clarification
Dear gurus, Im a newbie, and I want to ask a very general question. Assume that I have a set of numbers as follows, 1, 1, 2, 10, 100, 10,1 >From these, I need to identify which number is the most different as compared to others. (in this case, it will be 100, since its way larger than the other numbers). It doesnt have to be specifically this way, but I need to identify which number(s) are
2008 Jul 17
2
Fw: how i can install Rgraphviz in R2.7.1
--- On Tue, 15/7/08, haani hanni <maaryam_khan@yahoo.com> wrote: From: haani hanni <maaryam_khan@yahoo.com> Subject: how i can install Rgraphviz in R2.7.1 To: "Nabble" <support@nabble.com> Cc: r-help-request@r-project.org Date: Tuesday, 15 July, 2008, 1:39 PM hello i am a new user of R.i have window XP Proffessional in my P.C.i wanted to make the graphs of my
2010 Jul 10
7
Need help on date calculation
Hi all, please see my code: > library(zoo) > a <- as.yearmon("March-2010", "%B-%Y") > b <- as.yearmon("May-2010", "%B-%Y") > > nn <- (b-a)*12 # number of months in between them > nn [1] 2 > as.integer(nn) [1] 1 What is the correct way to find the number of months between "a" and "b", still
2005 May 18
5
Polycom Instant Messaging
Can anyone explain the Polycom Text Messaging features built in to the IP 500/600? Can Asterisk (or something else) talk to it? I've seen vague references to MSN Messenger, and somehow that's mentally disturbing. Chris Coulthurst <mailto:chris@shuksan.com> chris@shuksan.com -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Feb 16
2
leap years in temporal series command ts
Hi R community! I'd like to create a temporal series with ts command for the interval 1st January 2002 - 31 December 2008. I have daily values, so this is a 2557 days temporal series. I'm using this command : ts(observations, start=2002, end=2009, freq=365) However, I don't get the correct temporal series since both frequency (365 OR 366 for leap years) and deltat (1/365 OR
2007 May 29
1
Fw: hierarhical cluster analysis of groups of vectors
Hi Rafael, What about multivariate logistic regression? ----- Forwarded Message ---- From: Rafael Duarte <rduarte@ipimar.pt> To: Anders Malmendal <anders@chem.au.dk> Cc: r-help@stat.math.ethz.ch Sent: Tuesday, May 29, 2007 3:21:11 PM Subject: Re: [R] hierarhical cluster analysis of groups of vectors It seems that you have already groups defined. Discriminant analysis would probably