I have a dataframe
called perceptionAvailInfo
which contains the below columns I hope to iterate through->
names(perceptionAvailInfo)
## [1] "email" "HomeAddress" "HomePhone" "Cellphone"
## [5] "Employer" "PoliticalAffln" "WrittenWorks" "Photo"
## [9] "Video" "Groups" "Birthdate" "sex"
## [13] "age" "employ"
My code is as below ->
for (i in names(perceptionAvailInfo)) {
perceptionAvailInfo[i]
}
I have tried printing just i
,perceptionAvailInfo
etc inside the for loop but I don't see any output for the forloop. What am I missing?