Skip to content

Commit f3bc030

Browse files
authored
Merge branch 'master' into copilot/fix-36
2 parents 53eea43 + f9ca1bb commit f3bc030

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/ref_files/pq_example/code/pq_example/pq_example.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ head(input_data[, eval(var3)])
184184
nrow(input_data)
185185
length(which(complete.cases(input_data) == TRUE))
186186
summary(input_data)
187-
summary(input_data[, c(2:3)])
187+
summary(input_data[, 2:3])
188188

189189
# Get the mean for one var specified above:
190190
input_data[, .(mean = mean(eval(var3), na.rm = TRUE))] # drop with and put column name, usually better practice
191191
# Get the mean for all columns except the first one in data.table:
192-
input_data[, lapply(.SD, mean), .SDcols = c(2:ncol(input_data))]
192+
input_data[, lapply(.SD, mean), .SDcols = 2:ncol(input_data)]
193193
# Specify columns to get some summary stats (numeric variables):
194194
colnames(input_data)
195195
cols_summary <- c(3, 5, 6)

0 commit comments

Comments
 (0)