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
Focussed on vignette translation i've open in Rstudio (Package data.table version 1.15.4) the actual datatable-sd-usage.Rmd (master here) and executed the R chunks but it stops when executing the new form with names(). Below i have also included old form showing := .SD .SDcols are operational (but were replaced in the latest version).
Where to look for ?
From .Rmd file :
.....The syntax to now convert these columns to factor is simple:
[1] BOS CHI CLE KEK NYU ATH
101 Levels: ALT ANA ARI ATH ATL BAL BLA BLN BLU BOS ... WSN
Teams[ , names(.SD) := lapply(.SD, factor), .SDcols = patterns('teamID')]
# print out the first column to demonstrate success
head(unique(Teams[[fkt[1L]]]))
Erreur : LHS of := isn't column names ('character') or positions ('integer' or 'numeric')
The text was updated successfully, but these errors were encountered:
ChristianWia
changed the title
problem with calling names() in data.table/vignettes/datatable-sd-usage.Rmd
problem with calling names(.SD) in data.table/vignettes/datatable-sd-usage.Rmd
Jul 29, 2024
ok I had a lack of how-to. Sounds good now, I 've loaded the dvpt version :
> library("data.table")
data.table 1.15.99 IN DEVELOPMENT built 2024-07-29 17:39:54 UTC; Kriss using 1 threads (see ?getDTthreads). Latest news: r-datatable.com
and i've got a concrete result now :
The syntax to now convert these columns to `factor` is simple:
{r assign_factors}
Teams[ , names(.SD) := lapply(.SD, factor), .SDcols = patterns('teamID')]
# print out the first column to demonstrate success
head(unique(Teams[[fkt[1L]]]))
[1] BOS CHI CLE KEK NYU ATH
101 Levels: ALT ANA ARI ATH ATL BAL BLA BLN BLU BOS BRA ....
So we can close the topic. Thanks all for your help.
Focussed on vignette translation i've open in Rstudio (Package data.table version 1.15.4) the actual datatable-sd-usage.Rmd (master here) and executed the R chunks but it stops when executing the new form with names(). Below i have also included old form showing := .SD .SDcols are operational (but were replaced in the latest version).
Where to look for ?
From .Rmd file :
.....The syntax to now convert these columns to
factor
is simple:[1] BOS CHI CLE KEK NYU ATH
101 Levels: ALT ANA ARI ATH ATL BAL BLA BLN BLU BOS ... WSN
Erreur : LHS of := isn't column names ('character') or positions ('integer' or 'numeric')
The text was updated successfully, but these errors were encountered: