similar to: Feature request for 'sprintf' optimization (PR#9621)

Displaying 20 results from an estimated 500 matches similar to: "Feature request for 'sprintf' optimization (PR#9621)"

2008 May 25
1
Using unicode with sprintf or paste in Windows (PR#11515)
Full_Name: Michael Toews Version: 2.7.0 OS: Windows XP SP2 Submission from: (NULL) (24.80.163.230) Using Unicode characters in Windows works with static strings (as of R 2.7.0), however fails when used with sprintf() or paste(). For example, on R 2.7.0 for Windows XP (SP2): Static string (works, showing Greek Delta character): > print("\u0394Q = 2.2 L/s") [1] "ΔQ =
2007 Apr 20
1
sequential for loop
Hi all, I'm usually comfortable using the *apply functions for vectorizing loops in R. However, my particular problem now is using it in a sequential operation, which uses values evaluated in an offset of the loop vector. Here is my example using a for loop approach: dat <- data.frame(year=rep(1970:1980,each=365),yday=1:365) dat$value <-
2007 Dec 06
2
End of whiskers of boxplots are repeated on PDF device (PR#10499)
Full_Name: Michael Toews Version: 2.61 OS: WinXP SP2 Submission from: (NULL) (142.58.206.114) Using boxplot on a PDF device with more than one group (or boxes) produces multiple (and overlain) 1st and 3rd quartile ticks. There are exactly the multiple of boxplot groups as there are of each 1st and 3rd quartile ticks for each boxplot (drawn as a horizontal line at the end of each boxplot), which
2005 Jul 23
2
link_stat
Hi there, I set up my company's back up server using rsync. And I've got a strange problem. I searched in the archives of this list, but none of them seems not giving me an idea to solve the problem. If anyone can help, it would be grateful. I'm using cron by a user (non wheel/admin) to rsync everyday during the night. The cron is set in the server to transfer the backing-up
2007 Mar 21
1
bug and patch: strptime first-of-month error in (possibly unsupported use of) "%j" format (PR#9577)
Full_Name: John Brzustowski Version: R-devel-trunk OS: linux (problem under Windows too) Submission from: (NULL) (74.101.124.238) (This bug was discovered by Phil Taylor, Acadia University.) I'm not sure from reading the documentation whether strptime(x, "%j") is meant to be supported, but if so, there is a bug which prevents it from working on the first day of months after
2010 Oct 01
3
Converting a dataframe column from string to datetime
Hi, I have a dataframe column of the form v<-c("Fri Feb 05 20:00:01.43000 2010","Fri Feb 05 20:00:02.274000 2010","Fri Feb 05 20:00:02.274000 2010","Fri Feb 05 20:00:06.34000 2010") I need to convert this to datetime form. I did the following.. lapply(v,function(x){strptime(x, "%a %b %d %H:%M:%OS %Y")}) This gives me a list that looks like
2009 Feb 27
0
POSIXlt, POSIXct, strptime, GMT and 1969-12-31 23:59:59
R-devel: Some very inconsistent behavior, that I can't seem to find documented. Sys.setenv(TZ="GMT") str(unclass(strptime("1969-12-31 23:59:59","%Y-%m-%d %H:%M:%S"))) List of 9 $ sec : num 59 $ min : int 59 $ hour : int 23 $ mday : int 31 $ mon : int 11 $ year : int 69 $ wday : int 3 $ yday : int 364 $ isdst: int 0 - attr(*, "tzone")= chr
2010 May 19
0
A revised function for getting ISO week
Hi All, Two years back, I posted a small function for getting the ISO 8601 defined week number of a date (such as the week number used in all Swedish calendars), in a os-independent manner. I've since discovered an inaccuracy in that code, and so I thought I'd repost the corrected version. Hopefully this will come in handy for someone searching the mailing list archives in the future.
2010 Dec 27
1
Can't merge on datetime?
x = structure(list(date = structure(list(sec = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), min = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), hour = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), mday = c(1L, 2L, 3L, 4L, 5L, 8L, 9L, 10L, 11L, 12L, 15L, 16L, 17L, 18L, 19L, 22L, 23L, 24L,
2008 Dec 11
3
getting ISO week
Hi all, Is there a simple function already implemented for getting the ISO weeks of a Date object? I couldn't find one, and so wrote my own function to do it, but would appreciate a pointer to the "default" way. If a function is not yet implemented, could the code below be of interest to submit to CRAN? Best Regards, Gustaf --------------------
2007 Jan 17
2
problem with unlist POSIX date at midnight
Dear R-users, I use unlist of POSIX dates to extract the year, hour etc. With that I can search for files in my database which are in the form 'yyyymmddhh_synops.txt' However, I get stucked during midnight where unlist just gives NA's. The script is given below, the problem accurs at acc.period[16] (midnight). However when I write out the character, unlist works well. But
2005 Oct 06
2
isdst
Can someone, please, explain the difference is results below (notice the isdst value) > unlist(as.POSIXlt('2005-7-1')) sec min hour mday mon year wday yday isdst 0 0 0 1 6 105 5 181 1 > unlist(as.POSIXlt(as.Date('2005-7-1'))) sec min hour mday mon year wday yday isdst 0 0 0 1 6 105 5 181 0
2003 Aug 13
1
Problems with addition in big POSIX dates
Have you noticed any problems with big dates (>=1/1/2040) in R? Here is the bit of code that I'm having trouble with: > test.date <- strptime("1/1/2040",format="%m/%d/%Y") > > unlist(test.date) sec min hour mday mon year wday yday isdst 0 0 0 1 0 140 0 0 0 > > date.plus.one <- as.POSIXct(test.date) +
2013 Mar 19
1
Convert to date and time of the year
Dear R Users, I have data for more than 3 years. For each year I want to find the day corresponding to Jaunary 1 of that year. For example: > x <- c('5/5/2007','12/31/2007','1/2/2008') > #Convert to day of year (julian date) - > strptime(x,"%m/%d/%Y")$yday+1 [1] 125 365 2 I want to know how to do the same thing but with time added. But I still
2020 Oct 23
0
The presence/absence of `zone` in POSIXlt depending on time zone as a cause of possible inconsistences?
?Hi again, I take advantage of my previous mail to ask you a question for which I was looking for an answer when detected the behaviour I previously told. In the help of DataTimeClasses one can read: "POSIXlt" objects will often have an attribute "tzone", a character vector of length 3 giving the time zone name from the TZ environment variable and the names of the base time
2007 Dec 11
3
Wrong length of POSIXt vectors (PR#10507)
Full_Name: Petr Simecek Version: 2.5.1, 2.6.1 OS: Windows XP Submission from: (NULL) (195.113.231.2) Several times I have experienced that a length of a POSIXt vector has not been computed right. Example: tv<-structure(list(sec = c(50, 0, 55, 12, 2, 0, 37, NA, 17, 3, 31 ), min = c(1L, 10L, 11L, 15L, 16L, 18L, 18L, NA, 20L, 22L, 22L ), hour = c(12L, 12L, 12L, 12L, 12L, 12L, 12L, NA, 12L,
2006 Sep 19
4
Rgui.exe plot device "Save as" crash (PR#9237)
Full_Name: Michael Toews Version: 2.3.1 OS: WindowsXP Home/Proffesional SP2 Submission from: (NULL) (142.58.206.114) Hi, I have a bug that I can reproduce on two different MS Windows platforms (1:AMD64x2/WinXP SP2 Home; 2:P4/WinXP SP2 Prof.) which is triggered by the "Save as" dialog when saving a plot from a Windows device onto the Desktop. This bug is difficult to reproduce, but here
2011 Feb 19
1
problem in plotting numeric x by POSIXt class with lattice
# hi all, # I'm trying to plot temperatures by date in a trellis plot by their stations # I'm plotting the following data.frame library(lattice) h <- structure(list(station_name = structure(c(3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L, 5L, 8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L, 5L, 8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L), .Label = c("Ashqelon", "Beer Sheva",
2003 Jun 12
0
Re: write.table() fails for POSIXlt class and NAs in another variable (PR#3242)
Uwe Ligges wrote: > Consider the following data.frame: > > > testdata > date nothing > 1 1991-12-31 NA > 2 1991-12-31 NA > > where date is of class POSIXlt. For easy reproducibility: > > "testdata" <- structure(list(date = structure(list(sec = c(0, 0), > min = c(0, 0), hour = c(0, 0), mday = c(31, 31), mon = c(11, 11),
2017 Dec 08
0
Need help with labeling a plot correctly
Hi all, Eons ago (~2007) Hadley Wickham extremely generously helped me developed a means for plotting temporal activity w/ ggplot. I need to revisit this and have it working again.? I failed to copy the entire legacy code over to my traveling laptop from my workstation, but found a partial bit of the code in an old 2009 Gmail attachment.? I am slated to do a graduate seminar at UF G'ville