I will create survey with r programming. But i am new one. I want to count "yes" and "no" answer which will ask each people. And create data with them. How can i do this? My code is as follows:
survey <- c ("Are you student?", "Do you drive car?", "Do you smoke cigarette?")
surveyfunct <- function(v,m){
for(i in 1:length(v))
{m <-readline(v[i])
if (m == "yes" && m == "no"){
m <- readline(v[i+1])}}
return (list(m))}