-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Sorry if not relevant, I was not capable of finding my answer in the docs and there's no discussion Q&A section in this repo, so I ask my question here.
I want to have my project to format the code in this way:
library(data.table)
cw <- data.table(ChickWeight)
# fmt: skip
cw21 <- (
cw[Time %in% c(0, 21)]
[, Weight := weight]
[, Group := factor(paste0("Diet_", Diet))]
[, .(Chick, Group, Time, Weight)]
[order(Chick, Time)]
[1:5]
)
By default, is formatted this way:
# Air formatter by default
cw21 <- (cw[Time %in% c(0, 21)][, Weight := weight][,
Group := factor(paste0("Diet_", Diet))
][, .(Chick, Group, Time, Weight)][order(Chick, Time)][1:5])
I tried different options in air.toml file skip formatting options, but I'm lost.
# Air formatter with air.toml with [format] skip = ["[", "]", "`[`", "`]`"]
cw21 <- (cw[Time %in% c(0, 21)][, Weight := weight][,
Group := factor(paste0("Diet_", Diet))
][, .(Chick, Group, Time, Weight)][order(Chick, Time)][1:5])
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels