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

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to