converting female and male values to 1 and 0 using the 'drag and drop'
I want to convert the variable 'sex' to have 1 for female and 0 for male. I managed do to this R:ifelse(Sex == "F", 1, 0)
However, how do the same covertion with with "drag and drop'? (tried few times with 'Sex=F', with no success
Thank you
Comments
I also can't get it to work😭😭😭
@patc3 It works but very temperamental i.e. you have to get the code correct on the first go. The code is also now changed.
the new variable has to be set as nominal (not as scalar). Once the new variable is created you can change it to ordinal (but not scalar). It might be that you can still use it in logistic regression because JASP did not (previously) assign permanent variable type.
The problem is if creating a new variable does not go smoothly then the dataset might become corrupted: I tried creating a new variable called 'gen'. It not go as intended. When I then deleted the 'gen' column, it corrupted my reference variable I used for creating 'gen'.
Might be easier and safer to either save the work before creating a new variable or create the new variable in Excel.
Explained how to do it at: https://youtu.be/hfMxboCIyuE?si=0cVXnHcmBEBoxk_I&t=658
bW
The file contains few examples of created variables with drag-and-drop and R
Personal opinion: While the drag and drop is intended to simplify things for novices, I think in many cases things will turn out better if the novice uses R code.
R
what is a good starting point for novices trying to use R with JASP? any good tutorial or manual specifically for beginners?
No, not off hand, but maybe I could create a brief one.
R
Actually, here's a start, below.
(Also, FYI. I'm not sure it's the best thing to call this "R" code, because JASP is embedding within additional R code that the user can't see. So if one were to type these statements into an R console, it wouldn't work because the the code would be incomplete.)
R