I am a beginner of R, recently I met some troubles in creating a new variable with mutate() function. The data frame "evs" has six variables:v1,v2,v3,v4,v5,v6. I hope to calculate their average and assign the average to a new variable "intp.trust" ,so I use the following commands:
evs <- mutate(evs,intp.trust= mean("v1","v2","v3","v4","v5","v6"))
But the new varriable "intp.trust" turns to have only NA. Is there anything wrong with my command? I hope someone can help me with it.