I am trying to add a new column to the dataframe with same value for all the rows.
I tried to use append
method as well as cbind
.
url.data <- read.csv('pathToFile')
url.data <<- append(url.data , 'iOS')
url.data <<- as.data.frame(url.data)
Also, I tried this:
cbind(url.data, platform='iOS')
None of these works. A new column gets added using Cbind but with N/A for all the values and not iOs.
edit:head(url.data) of the data after trying cbind:
X2016.07.24 None Mobile_Menu None.1 N.A X13 N.A.1 X1 X0.0769 X13.1 X1.1
1 2016-07-24 None Organic None N/A N/A N/A 246 N/A 0 0
2 2016-07-24 None googleadwords_int 408578282 N/A 10 N/A 2 0.2000 87 2
3 2016-07-24 None googleadwords_int 408578282 N/A 41 N/A 1 0.0244 8 1
4 2016-07-24 None googleadwords_int 408578282 N/A 28 N/A 4 0.1429 17 2
5 2016-07-24 None googleadwords_int 408578282 N/A 29 N/A 4 0.1379 23 2
6 2016-07-24 None googleadwords_int 408601922 N/A 10 N/A 1 0.1000 17 1
X1.0000 N.A.2 N.A.3
1 0.0000 N/A N/A
2 1.0000 N/A N/A
3 1.0000 N/A N/A
4 0.5000 N/A N/A
5 0.5000 N/A N/A
6 1.0000 N/A N/A