-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug with POSIX results after grouping? #689
Comments
geneorama, What do you get when you do: with(df, ave(DATES, LEVELS, FUN=min)) ?? |
Well, if you get the same result using |
@arunsrinivasan I get : > `with(df, ave(DATES, LEVELS, FUN=min))`
> [1] "2010-01-01 GMT" "2010-01-01 GMT" "2010-01-01 GMT" "2010-01-01 GMT"
> [5] "2010-01-01 GMT" "2010-01-06 GMT" "2010-01-06 GMT" "2010-01-06 GMT"
> [9] "2010-01-06 GMT" "2010-01-06 GMT" EDIT: After some offline conversation I understand that @arunsrinivasan was expecting that this result would also be shifted by 6 hours on my computer. |
The function you're using It is not "absolutely" useless as it does help identify that the problem is elsewhere. I'll refrain from commenting on this post and leave Matt to it. |
So, after some back and forth (mostly offline) with @arunsrinivasan I gather the following: I was not able to install version 1.9.3 to see if this would fix the problem. |
And from our email exchanges, your error message was: vanilla --default-packages= -e "tools::buildVignettes(dir = '.', tangle = TRUE)"' had status 1
ERROR
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, :
pdflatex is not available
Calls: <Anonymous> -> texi2pdf -> texi2dvi
Execution halted
Error: Command failed (1) which to my knowledge is just a google search away: "install pdflatex windows". |
Oh, I found something else. How does one "install pdflatex windows"?
|
Gene, If this discussion continues in this manner, I'll have to close this as not-reproducible (on 1.9.3) and invalid. |
This has been very time consuming for me, and unproductive. So far I know I've only been asking you to explain what you mean by your answers. You Can you tell me how something is normally labeled a bug on github? This seems like a fair question since you have taken it upon yourself to
|
Closing as not reproducible on 1.9.3. Will re-open if someone reports they're able to reproduce on 1.9.3. |
@geneorama as far as I can see you have received ample help and time. Arun has responded to your initial report within 24 hours, tried to reproduce the problem on his system, followed up with you offline on multiple occasions and tested different software set-ups. The problem appears to be with your machine environment. This FWIW I cannot reproduce this (i.e. I get the expected results) on my
Gives me:
|
On another note, I notice in your session info you have a lot of packages loaded. If it wasn't already suggested, I would load a fresh session and only load |
@simonohanlon101 I was able to reproduce this error with only data table loaded on a linux server and a windows desktop. I only copied in my systemInfo() later to show that I had also tested it on linux and that it's not an issue with the OS. The real problem with upgrading to 1.9.3 is that it's a development version. I can't expect other people to be able to reproduce my work if they have to go through a complicated install. Am I supposed to tell people that want to know about vacant and abandoned buildings that they need to install a latex compiler, add it to their system path, so that devtools::install_github will work, so that they can reconstuct a time series? I don't know why you can't reproduce the problem. I'm running it here on a third machine and getting the same issue. > library(data.table)
data.table 1.9.2 For help type: help("data.table")
> ## Create the example
> df <- data.table(LEVELS = rep(letters[1:2], each=5),
+ DATES = as.POSIXct('2010-01-01', tz="gmt") +
+ seq(0, 86400*9, 86400))
> ## Create a new column with the minimum date
> df[LEVELS=="a", MINDATE := min(DATES), LEVELS]
> ## The results are not what I expect
> df
LEVELS DATES MINDATE
1: a 2010-01-01 2009-12-31 18:00:00
2: a 2010-01-02 2009-12-31 18:00:00
3: a 2010-01-03 2009-12-31 18:00:00
4: a 2010-01-04 2009-12-31 18:00:00
5: a 2010-01-05 2009-12-31 18:00:00
6: b 2010-01-06 <NA>
7: b 2010-01-07 <NA>
8: b 2010-01-08 <NA>
9: b 2010-01-09 <NA>
10: b 2010-01-10 <NA>
> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] data.table_1.9.2
loaded via a namespace (and not attached):
[1] plyr_1.8.1 Rcpp_0.11.2 reshape2_1.4 stringr_0.6.2 tools_3.0.2
> |
@geneorama I can't reproduce the problem because my timezone is |
@simonohanlon101 the problem's been already fixed in 1.9.3 (as you've showed from 1.9.3 as well). I'm just going to confirm it. |
@simonohanlon101 That's exactly what I said in my original post. I spent a lot of time figuring out the problem. |
To wrap this post for good: This bug is reproducible on 1.9.2. And was fixed in 1.9.3 bug #36 > df
LEVELS DATES MINDATE
1: a 2010-01-01 2010-01-01 01:00:00
2: a 2010-01-02 2010-01-01 01:00:00
3: a 2010-01-03 2010-01-01 01:00:00
4: a 2010-01-04 2010-01-01 01:00:00
5: a 2010-01-05 2010-01-01 01:00:00
6: b 2010-01-06 <NA>
7: b 2010-01-07 <NA>
8: b 2010-01-08 <NA>
9: b 2010-01-09 <NA>
10: b 2010-01-10 <NA> And then I tested it on the commit which fixed #36 (commit 1169) and got this: > df
LEVELS DATES MINDATE
1: a 2010-01-01 2010-01-01
2: a 2010-01-02 2010-01-01
3: a 2010-01-03 2010-01-01
4: a 2010-01-04 2010-01-01
5: a 2010-01-05 2010-01-01
6: b 2010-01-06 <NA>
7: b 2010-01-07 <NA>
8: b 2010-01-08 <NA>
9: b 2010-01-09 <NA>
10: b 2010-01-10 <NA> The "attribute" In summary, this has been fixed in 1.9.3. And there's nothing more to discuss. |
@geneorama Hi. Just to mention a few things that might not have been clear ...
The general idea is that you would have found this item in README.md first, considered it (just) plausable that v1.9.3 might fix the issue (it mentions Date as an example which is close to POSIXct), and try v1.9.3, before raising an issue. Or just try the development version anyway without even reading README.md. Why isn't v1.9.3 on CRAN yet? See paragraph at the top of README.md. In my mind, the question now is : have you installed Rtools which includes pdflatex I believe and more. Windows users at many big corporations have reported success with it. More information can be found online via devtools package or directly searching for "Rtools". I believe. Matt |
@mattdowle Thank you for the reply, and sorry to bother (all) of you. I will respond in sequence.
Speaking of annoying and complicated, I don't know why I'm getting the pdf latex error; but I don't really care. Latex has gone from my "on watch" list to "dead to me". Soon I'll set up another linux instance to for this sort of testing, I just don't have access to some of my normal test environments right now in my new position. I think it's great that 1.9.3 isn't on CRAN yet, it's wonderful that you have a development cycle and a dev version. However, I didn't understand the response of "it's not a bug in 1.9.3" to mean "we've fixed this and it will be coming soon to a theater near you". I heard (in order) "try Good luck in LA. I wish I could say that I'll see you there... I hope you can stop reading github posts and work on your workshop. As always, I deeply appreciate everyone's hard work in making |
You've made several edits, to your post adding sessionInfo, and edited out other posts so they lose continuity, after our email exchange. And you write:
which makes little sense, because from our email exchange:
You write:
It's very time consuming for everyone. And what you say about that you knew nothing than when you started is plain wrong, given the email message quoted above. |
@arunsrinivasan Yes, I did edit my posts to add information and focus on the issue. I wish that this hadn't been so time consuming. |
I ran into this problem last week, and I eventually found that using "IDate" solves the problem. However, I still would call this a bug.
In my example I start with a data table that has two variables:
I create a new column "MINDATE" for "LEVELS" == "a"
I expect "MINDATE" will be "2010-01-01" or NA, but it becomes "2009-12-31 18:00:00" or NA. The original date column is GMT, but MINDATE becomes GMT-6, which is my local timezone.
Thanks,
Gene
Also, I'm adding in my system info for the two machines that I used to test this:
--------------- COMPUTER 1 SESSION INFO ---------------
--------------- COMPUTER 2 SESSION INFO ---------------
The text was updated successfully, but these errors were encountered: