I just need help with one function in R Studio. How can I reference the Theta co
ID: 3363622 • Letter: I
Question
I just need help with one function in R Studio. How can I reference the Theta column in my dataset for this function Productivity= (50 + 5*ifelse(Theta=1,1,0) + y)
> Productivityl-ErF2 (nruns- 4 ,nfactors- 2, blocks- 1, alias.block.2fia = FALSE , ncenter= 0 , MaxC2 = FALSE , resolution-NULL , replicationgz 10 repeat.only FALSErandomize- TRUE ,se18542actor.names-1ist Tau(-1,1), Theta c(-1,1) > y Productivitylsy Productivityl Productivity,Productivity Productivity > MEPlot (Productivity!, abbrev=4, select-c (1,2), response="y") Messages [94] ERROR: unused argument ("2 -1) [95] ERROR : unused argument (Theta = 1) used argumentExplanation / Answer
You are trying to construct Productivity variable and then add it to Productivity1 dataset.
You are trying to access Theta directly directly, you have to use Productivity1 with a $ sign and use == instead of =
Use the code below:
Productivity = (50+ (5*ifelse(Productivity1$Theta == 1,1,0)) +y)
Productivity1$Produtivity = Productivity