I would like to recode a variable (Pr(>|t|)_oldvar
) which contains a ">")
mydata$newvar[mydata$Pr(>|t|)_oldvar>0,10] <- 0
I get an error that there is an unexpected '>'.
I get the same error when I try to rename the variable.
Any idea's on how to get the '>|t|' out of the variable name?
This might be too simple of an approach, but have you tried using the names function? Something like the following: names(mydata)[which(colnames(mydata)=="Pr(>|t|)_oldvar")] <- "Pr_newvar"
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加