Comments (17)
Note : I am facing this issue on 1 machine & not on another machine. I have both machines at master version of nanotime; what could be the issue ?
from nanotime.
Nobody can tell you unless you
- learn how to prepare a reproducible bug report
- stating versions used, OS used, ...
See maybe https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example or other tutorials.
from nanotime.
I was already on my way to debug the code..But there may be a hunch produced by the developers of the code on when you see these kind of messages, or rather what kind of code paths suffer this. To have a reproducible bug, I will have to dig deeper into implementation of nanotime / callNextMethod, which I am already doing. Last, I raised an issue with deep analysis. But you always do not have time, a bit of idea may help you drill the exact issue faster. Anyways ..
from nanotime.
It is a CRAN package. These have tests. And they are tested. See here: https://cloud.r-project.org/web/checks/check_results_nanotime.html
So unless you prove something reproducible it most likely is "merely" an out of sync installation on your box.
from nanotime.
Initial, yet useful info. Will get back with more. Meanwhile, if you have some info, so share
The machine where it repros (R version 3.2.3), using the same code below, installs the dependencies 'bit', 'Rcpp', 'bit64', 'RcppCCTZ', 'zoo', while it does not do with the machine where it repros (R version 3.4.4).
Other messages, while installation
Creating a generic function for 'print' from package 'base' in package 'nanotime'
Error
error in evaluating a 'primitive' next method: Error: incompatible types (from symbol to double) in subassignment type fix"
Calls: rbind ... [<- -> new -> initialize -> initialize -> callNextMethod
Code
system("mkdir -p ~/R/library")
.libPaths( c( .libPaths(), "~/R/library") )
repo = "http://cran.us.r-project.org"
mylib = "~/R/library"
install.packages("nanotime", lib = mylib, repos = repo)
library("nanotime", lib.loc = .libPaths())
d = NULL
td = data.frame("time" = c("1", "2", "3"), "col" = c(1, 2, 3), stringsAsFactors = FALSE)
td$time = nanotime(as.integer64(td$time))
tmp = rbind(d, td)
from nanotime.
The message is a just, a message. It is not an error.
Now your error code appears to be
d = NULL
td = data.frame("time" = c("1", "2", "3"), "col" = c(1, 2, 3), stringsAsFactors = FALSE)
td$time = nanotime(as.integer64(td$time))
tmp = rbind(d, td)
which works for me:
R> d <- NULL
R> td <- data.frame(t=nanotime(c(1, 2, 3)), col= 1:3, stringsAsFactors = FALSE)
R> td
t col
1 1970-01-01T00:00:00.000000001+00:00 1
2 1970-01-01T00:00:00.000000002+00:00 2
3 1970-01-01T00:00:00.000000003+00:00 3
R> rbind(d,td)
t col
1 1970-01-01T00:00:00.000000001+00:00 1
2 1970-01-01T00:00:00.000000002+00:00 2
3 1970-01-01T00:00:00.000000003+00:00 3
R>
In general, I recommend sticking with data.table over data.frame.
Next time, please start from a reproducible error message.
from nanotime.
I even used github version in both. That reproed in machine. I do not appreciate your lack of patience & ignorance in closing this issue. Anyways, i will get to the root of it !
While you say about rbind starting with NULL, it works with all other data ! Also, rbind example is a simplistic one. It may repro with other scenarios also.. ( i have done my homework)
from nanotime.
Hm. I also tried on a box where I am pretty sure it is the CRAN version that is installed, and it too worked.
from nanotime.
Maybe you are not using the current CRAN version. I can't tell -- your report has insufficient detail.
from nanotime.
Now, try a repro:
Use R version 3.2.3
Install nanotime
Rerun the same code..
from nanotime.
d = NULL
td = data.frame("time" = c("1", "2", "3"), "col" = c(1, 2, 3), stringsAsFactors = FALSE)
#td$time = nanotime(as.integer64(td$time))
d = rbind(d, td)
If I comment your 'tested' nanotime, this does not give any error.
Now, this does repro ! I stand vindicated...
from nanotime.
I know of one more nanotime issue even in release, but whatever happened is very disappointing. I chose not to raise it
from nanotime.
Use R version 3.2.3
I do this as a volunteer, and I do not have time to support three year old R versions. That is your problem. Try R 3.4.4 or R 3.5.1, things should work. Good luck.
from nanotime.
Your whole problem is, if I may guess, that you seem to insist on passing your integer64 arguments as characters, even though are numbers. But whatever.
from nanotime.
One last point: You don't have a name. You hide behind a pseudonym. You have no repos.
We do this as a gift economy. Most people who expect something for free (and of course also "immediately") at least try to give something back. What have you done for us? I grant you that your last bug report (which you then ignored for two weeks) was moderately helpful. This exchange here however was a complete waste of time, yours and mine.
from nanotime.
Thanks sir for maintaining. I respect that. But your tone could have been better / more encouraging for handling this issue. You could have said we do not support this version, or tell some workaround. Even do.call(rbind, lapply generated list) does not work.
As regards '''passing your integer64 arguments as character''' is concerned, I did that as I was actually reading nanos time from a file, to read them with precision, I have to read them as character. So, I just used that code snippet. There is no perfect wise man in this world. We must respect each other and help each other become better. That would be real giving !
from nanotime.
You could take a look at the existing documentation and try, say, look at the README.md and just vary that:
R> library(nanotime)
R> x <- nanotime("2018-01-02T03:04:05.006007008+00:00")
R> x
[1] "2018-01-02T03:04:05.006007008+00:00"
R>
There is even help(nanotime)
. But why read when you can just try random crap and then waste my justifying it.
from nanotime.
Related Issues (20)
- R-devel nags HOT 3
- Filter timestamps between times from specific time zone HOT 2
- Add/subtract methods for nanoduration/difftime durations HOT 1
- Add/subtract methods for nanotime datetimes and difftime durations HOT 1
- Add 'as.nanoduration.Duration()' HOT 5
- Issues with 'nanoival()' checks/tests HOT 7
- 'as.nanotime(NA_character_)' throws an ERROR HOT 5
- 7 out of 1256 tests failed on ppc32 HOT 5
- POSIXct -> nanotime -> POSIXct consistency HOT 13
- nanoduration divided by nanoduration should return double rather than integer64
- as.Date does not handle the case where tz is a vector HOT 5
- Could you implement comparaison on nanoduration and Character HOT 3
- Duration since yesterday's midnight in some timezone HOT 4
- nanotime 0.3.3 release HOT 2
- as.character(nanotime) returns the underlying integer HOT 4
- Export `nanoperiod` C interface for other packages to use
- Incorrect parsing for negative `nanoperiod`
- Support for abs() HOT 13
- Add to awesome-vctrs? HOT 1
- Incorrect subsetting with operator `%in%` HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanotime.