I am working with the R programming language. Suppose I have the following dataset:
a = rnorm(10,10,10)
b = rnorm(10, 6, 7)
c = rnorm( 10, 5, 5)
d = data.frame(a,b,c)
head(d)
a b c
1 18.3615091 -1.1253320 0.3403199
2 4.9365020 2.4014072 -3.5771919
3 12.5686200 0.7474177 -4.6788551
4 0.1913607 -0.6456205 3.8693564
5 9.1718179 16.1776224 8.1820692
6 18.3757202 4.1313655 -0.4195688
Is it possible to convert this data set into a single column of data (i.e. 1 column and 30 rows)?
I tried a few ways:
#first way
d = data.frame(a + b + c)
#second way
d = cbind(a,b,c)
#third way
d = rbind(a,b,c)
But nothing seems to work.
Can someone please show me how to do this?
Thanks