Add Column to DataFrame in R - Spark by {Examples}

PHOTO EMBED

Tue Dec 27 2022 02:21:19 GMT+0000 (Coordinated Universal Time)

Saved by @Mostafa_malmir

# By using bracket notation
chapters = c(76,86)
df['chapters'] <- chapters
df
content_copyCOPY

https://sparkbyexamples.com/r-programming/add-column-to-dataframe-in-r/