File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -137,11 +137,11 @@ as.data.table.list = function(x,
137137 # Handle keep.rownames for vectors (mimicking data.frame behavior)
138138 vector_rownames = NULL
139139 if (! isFALSE(keep.rownames )) {
140- for (i in seq_len(n )){
140+ for (i in seq_len(n )) {
141141 xi = x [[i ]]
142142 if (! is.null(xi ) && is.atomic(xi ) && ! is.null(names(xi )) && is.null(dim(xi )) && length(names(xi )) > 0 ) {
143143 valid_names = names(xi )
144- if (any(nzchar(valid_names ))) {
144+ if (any(nzchar(valid_names ))) {
145145 vector_rownames = valid_names
146146 x [[i ]] = unname(xi )
147147 break
@@ -218,7 +218,7 @@ as.data.table.list = function(x,
218218 if (check.names ) vnames = make.names(vnames , unique = TRUE )
219219
220220 # Add rownames column when vector names were found
221- if (! is.null(vector_rownames )){
221+ if (! is.null(vector_rownames )) {
222222 rn_name = if (is.character(keep.rownames )) keep.rownames [1L ] else " rn"
223223 ans = c(list (recycle(vector_rownames , nrow )), ans )
224224 vnames = c(rn_name , vnames )
You can’t perform that action at this time.
0 commit comments