Displaying 1 result from an estimated 1 matches for "standfti".
2010 Apr 26
1
Help with replacement of certain values in dataset with SAS code equivalent
...core1[guys]<-20*q1[guys] + q2[guys]
mydata$score2[guys]<-30*q1[guys] + q2[guys]
print(mydata)
# This step uses NULL to delete the guys & gals vars.
mydata$gals <- mydata$guys <- NULL
print(mydata)
This is how I modified the code from above to try to do what I wanted:
StandFTI <- cbind(StandFTI, score1 = NA, score2 = NA)
attach(StandFTI)
StandFTI$Stand <- FTIStandKey=="NAH6005-001" #Creates a logical vector for
males.
StandFTI$score1[Stand]<- "TEST"
print(StandFTI)
But I get the warning message:
In `[<-.factor`(`*tmp*`, guys,...