# Load tidyverse
library("tidyverse")
# Using add_column()
df2 <- df %>%
add_column(add_column = "constant_value")
df2
# Output
# id pages name add_column
#1 11 32 spark constant_value
#2 22 45 python constant_value
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter