I want to create a new column in a data frame containing only odd numbers between 1:200. I'm using "cbind" to add the new column, but I'm not sure how to specify that I want only odd numbers. Right now my line of code looks like this
odd <- cbind(rowNA, seq(1:200, by = 2 + 1))
Edit: I'm going to add the rest of Rscript from the assignment I'm working on to see if that helps
# Rassignment 2#
#Q1
#a
nums <- seq(1:100)
#b
tens <- rep(10, times = 100)
#c
ab <- data.frame(nums, tens)
#d
rowNA <- rbind(ab, c(NA))
#e
odd <- cbind(rowNA, seq(1, 200, by = 2))