Skip to content
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

Misc #938

Closed
wants to merge 1 commit into from
Closed

Misc #938

wants to merge 1 commit into from

Conversation

matthieugomez
Copy link
Contributor

  • I changed the syntax of setcolorder. This solves setcolorder could accept a vector of column names of length lower than the number of columns #798 and [R-Forge #2490] Add new movecol(DT, "colname", 1) function #592 in a way consistent with how setnames works. When only one argument is given (beyond the data.table) , setcolorder behavior does the exact same thing as before. However, I renamed this argument from "neworder" to "old" to be consistent with setnames. A second argument (a numeric vector) can now be specified. Tests added
  • rename by argument of na.omit by cols.
  • regex and wildcard can be used in .SDcols. This solves Wildcards #817
  • Enclosing by argument of [.data.table by "()" makes sure NSE is not used, similarly to LHS in :=
  • New classes IMonth and IQuarter. Elapsed month and quarters are useful in a lot of cases. An example is to use the roll option with respect to 1 month since one cannot use roll = month(1). yearmon and yearqtr exist in zoo but they are stored as double (elapsed year + 1/12 or 1/4). I wrote these integer classes for personal use. Discovering IDate and ITime, it makes sense to add them here.

Sorry I though squashing commits meant merging PR.

@matthieugomez matthieugomez changed the title setcolorder works like like setnames Misc Nov 14, 2014
…SDcols", SE in "by" when enclosed in parenthesis, "by" option renamed to "cols" in na.omit
@arunsrinivasan
Copy link
Member

Too many things here. Would be nice to have as separate PRs, and would be nice to discuss first (so as to avoid wasting your time).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants