You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A warning generated by as.data.table upon encountering POSIXlt formatting would have saved me several minutes. A FAQ entry relating to this might be useful to some, as well.
Background: I recently converted a data frame containing a date/time column to a data table (using as.data.table) in order to generate a grouped mean. The data frame silently converts, but then when trying to generate the means (using DT[, lapply(.SD,mean), "Key_column"]), I get the dreaded (by me) error "GForce mean can only be applied to columns, not .SD or similar." After narrowing down the problem to a single column, I find that manipulating it yields the fairly cryptic (to me) warning: "In is.na(secs) : is.na() applied to non-(list or vector) of type 'NULL'". Once I figured it out (via stackoverflow), it isn't too difficult to work around, it just took a little while to find the problem.
The text was updated successfully, but these errors were encountered:
A warning generated by as.data.table upon encountering POSIXlt formatting would have saved me several minutes. A FAQ entry relating to this might be useful to some, as well.
Background: I recently converted a data frame containing a date/time column to a data table (using as.data.table) in order to generate a grouped mean. The data frame silently converts, but then when trying to generate the means (using DT[, lapply(.SD,mean), "Key_column"]), I get the dreaded (by me) error "GForce mean can only be applied to columns, not .SD or similar." After narrowing down the problem to a single column, I find that manipulating it yields the fairly cryptic (to me) warning: "In is.na(secs) : is.na() applied to non-(list or vector) of type 'NULL'". Once I figured it out (via stackoverflow), it isn't too difficult to work around, it just took a little while to find the problem.
The text was updated successfully, but these errors were encountered: