similar to: How to get the day of the year

Displaying 20 results from an estimated 1000 matches similar to: "How to get the day of the year"

2008 Oct 03
1
Problem with strptime
Hello, I have a column with dates in the form %Y-%m-%d %H:%M:%S; I want to substract the line i+1 to the line i and get a numeric result (in seconds for instance). This is what I did (I take the data from a database): res<- dbSendQuery (con, "SELECT Date_Heure FROM data.meteo ")Time<-fetch(res, n=-1)TimeDifferencetime<-as.numeric(diff(strptime(Time, format='%Y-%m-%d
2015 Dec 21
1
Fruit module configured to use matter still write ._* files
I have configured samba as follow: [global] workgroup = GOYMAN netbios name = MATRIX security = user encrypt passwords = yes smb passwd file = /var/db/samba4/private/passdb.ntdb vfs objects = catia fruit streams_xattr fruit:resource = xattr fruit:metadata = netatalk fruit:locking = netatalk fruit:encoding = private [projects] path = /data/projects write list = kuon, ino force create mode = 0770
2005 Apr 22
2
help with POSIX
For the r script below >datestr <- "01/01/2004" >as.POSIXct(as.Date(datestr, "%d/%m/%Y")) I get the following output "2003-12-31 18:00:00 Central Standard Time" Why is the date a day before. I guess its something to do with the time, but is there a way to get it to return 2004-01-01 instead? Thanks in advance... -Sandeep [[alternative HTML version
2007 Oct 16
1
try / tryCatch for download.file( ) within a for loop when URL does not exist
I am trying to download a bunch of files from a server, for which I am using download.file( ) within a for loop. The script is working fine except until download.file hits a URL which has no file, at which point it exits. I want to change this behavior to simple log the failure and maintain state within the for loop and iterate to next. I read about try / tryCatch but am having trouble
2008 Jun 08
20
how to parse a "dd/mm/yyyy" formatted date string???
Hi, I''m stuck. How do you parse a "dd/mm/yyyy" formatted date string??? I get a date format error. Thanks in advance Greg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
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
2007 Oct 15
1
String concatenation, File Path Handling to pass to download.file( ) [backslash in DOS paths]
Gabor, Thanks much. Your solution is elegant. My overall scheme is to take present date, and check whether it is a weekend, if not, then create a string based on the date, to concatenate into a url link for download.file( ). The files I need to download have a part which is in the format: mmddyy. I am working to make myself a system to connect to exchanges, and download end of day files from
2006 Sep 28
0
:order => [:day, :month, :year] with date_select
I still get the year month day display using this option.. (Rails 1.1.6) I thought a patch solved it.... not yet included in this version ? is also the option :discard => :day included or not ? (I need a date selection with only month and year) thanks fir your info kad -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this
2018 May 05
0
Adding Year-Month-Day to X axis
Hi Greg, The only reason I included the staxlab function in the plotrix library was to fit all the dates onto the axis. If you want to try it: install.packages("plotrix") Jim On Sun, May 6, 2018 at 9:02 AM, Gregory Coats <gregcoats at me.com> wrote: > Jim, Thanks for responding! > I am using the official R 3.5.0 for Mac OS X. > This apparently does not include library
2018 May 06
2
Adding Year-Month-Day to X axis
Jim, That you very much! How do I instruct staxlab to label once every n days, rather than labeling every day? Greg > On May 5, 2018, at 6:50 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > > staxlab(1,at=x_yyyymmdd,labels=format(x_yyyymmdd,"%Y-%m-%d")) [[alternative HTML version deleted]]
2018 May 06
0
Adding Year-Month-Day to X axis
Hi Greg, By default, the "axis" function puts the labels on one line and drops labels that would overlap. When you have labels that are all the same length, this usually results in every second, or third, or fourth label being displayed. So you can probably get what you want by not using staxlab. However, if you really want to use staxlab, try this:
2018 May 07
0
Adding Year-Month-Day to X axis
Look at par(las=2) in the graphics package. You will almost certainly have to increase the bottom margin, e.g.: par(mar=c(6,4,4,2) to accomodate the vertical labels. Jim On Mon, May 7, 2018 at 2:11 PM, Gregory Coats <gregcoats at me.com> wrote: > Thanks. Regarding > axis(1,at=x_yyyymmdd,labels=format(x_yyyymmdd,"%Y-%m-%d")) > > How do I get the text for YYYY-MM-DD
2018 May 08
0
Adding Year-Month-Day to X axis
Hi Greg, This is because both plots have equally spaced x values. To see the difference, try this: plot (x_yyyymmdd, y_duration, type="l", xaxt="n", yaxt="n", ylim=range(240,480), xlab="", ylab="", col="blue") axis(1) plot ( y_duration, type="l", xaxt="n", yaxt="n", ylim=range(240,480),
2018 May 09
0
Adding Year-Month-Day to X axis
Actually I would like to get an output on the below snapshot. I have tried various method like points, labels.. but nothing works. Attached is the data for your reference. On May 09, 2018, at 09:59 AM, Gregory Coats <gregcoats at me.com> wrote: I do not see any difference between the x versus y plot drawn in blue, and the y only plot drawn in red. Is the correct? Greg y_duration <- c
2018 May 05
1
Adding Year-Month-Day to X axis
Jim, Thanks for responding! I am using the official R 3.5.0 for Mac OS X. This apparently does not include library (plotrix) library(plotrix) Error in library(plotrix) : there is no package called ?plotrix? Greg > On May 5, 2018, at 6:50 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > > Hi Greg, > What you are getting there is a factor, interpreted as a 1:n sequence >
2018 May 07
2
Adding Year-Month-Day to X axis
Thanks. Regarding axis(1,at=x_yyyymmdd,labels=format(x_yyyymmdd,"%Y-%m-%d")) How do I get the text for YYYY-MM-DD to be drawn vertically, instead of horizontally? Greg > On May 6, 2018, at 11:54 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > > axis(1,at=x_yyyymmdd,labels=format(x_yyyymmdd,"%Y-%m-%d")) [[alternative HTML version deleted]]
2018 May 08
1
Adding Year-Month-Day to X axis
I do not see any difference between the x versus y plot drawn in blue, and the y only plot drawn in red. Is the correct? Greg y_duration <- c (301.59050, 387.35700, 365.64366, 317.26150, 321.71883, 342.44950, 318.95350, 322.33233, 330.60333, 428.99516, 297.82066, 258.23166, 282.01816, 280.00000) x_yyyymmdd <-as.Date(c ("2018-04-25", "2018-04-26", "2018-04-27",
2008 Jan 01
1
How to convert day-month-year to Julian data number?
Hi, Is there a package for converting day-month-year type date to julian day number (JDN)? I looked around and I couldn't find any (I am pretty new to R...) Thanks and happy New Year to everybody! H. N?zhet Dalfes Professor, Istanbul Technical University Eurasia Institute of Earth Sciences +90 (532) 206-1308 [dalfes at itu.edu.tr]
2008 Dec 28
1
month-day-year to Date
I have a data from with 3 numeric variables, and wish to create a Date object. The old "date" library had a function mdy.date to do this. I've chased all of the See Also sections I can find for the Date class, and didn't find anything comparable. Yes, I can use as.Date(paste(data$year+1900, data$month, data$day), sep='/')) but it seems odd pack something together that
2010 Oct 08
0
Plot data on year/mon/day
Hi, I am trying to use rect (R2.11) to plot a set of data as following Company Pt Pri Pub A W200 4/5/2009 3/11/2010 B W293 2/30/2003 3/24/2005 A W258 2/8/2008 8/17/2010 C W248 5/13/2009 1/2/2010 %y <- seq(0,0.5*(length(company)-1),0.5) %h <- 0.1 %rect(pri, y-h, pub, y+h, col=c("light blue","pink","yellow","red")) I wonder if