Displaying 1 result from an estimated 1 matches for "mp1b".
Did you mean:
mp1
2005 Dec 13
2
creating a subset of a dataset using ifelse statement?
I am using R in a Microsoft Windows environment.
I have a dataset called “mp1b”. I have a variable called h.
h can take a value from -1 to 5.
If h <1, I want to create a new dataset called mp2 that is the same as mp1b:
“mp2<-mp1b”
If h > 0, I want to set create a dataset mp2, where I limit the original dataset to those where mp1b$group = =h....