[R] Using the pipe, |>, syntax with "names<-"

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Sun Jul 21 00:21:01 CEST 2024


On 2024-07-20 6:02 p.m., Iris Simmons wrote:
> z <- data.frame(a = 1:3, b = letters[1:3])
> z |> names() |> _[2] <- "foo"
> z

That's a great suggestion!

Duncan Murdoch



More information about the R-help mailing list