Write a R program to convert given dataframe column(s) to a vector.
dfc1 = c(1, 2, 3, 4, 5) dfc2 = c(6, 7, 8, 9, 10) dfc3 = c(11, 12, 13, 14, 15) dfc4 = c(16, 17, 18, 19, 20) v <- data.frame(dfc1=1:5, dfc2=6:10, dfc3=11:15, dfc4=16:20) print(v)
Sample Output:
dfc1 dfc2 dfc3 dfc4 1 1 6 11 16 2 2 7 12 17 3 3 8 13 18 4 4 9 14 19 5 5 10 15 20
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer