We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Submitted by: Garrett See; Assigned to: Nobody; R-Forge link
Note that in the output below the values in V1 are only 6 digits long
V1
library(data.table) dat <- data.table(Date=c(20131101:20131130, 20131201:20131231)) dat[, last(Date), by=Date %/% 100L] # Date V1 #1: 201311 201311 #2: 201312 201312
I thought it should give the same results as this:
dat[, last(Date), by=substr(Date, 1, 6)] # substr V1 #1: 201311 20131130 #2: 201312 20131231
The text was updated successfully, but these errors were encountered:
ee56aff
arunsrinivasan
No branches or pull requests
Submitted by: Garrett See; Assigned to: Nobody; R-Forge link
Note that in the output below the values in
V1
are only 6 digits longI thought it should give the same results as this:
The text was updated successfully, but these errors were encountered: