Hi Stefán
you might not to see the wood for the trees, but ?subset is a R function
as well.
MalesData <- subset(Datatemp,Datatemp$sex==1)
btw. your selection
> MalesData <- Datatemp[Datatemp $sex==1]
went wrong for two reasons:
(a) the extra space befor $
(b) incorrect indexing. Datatemp is a dat
*Dear R community*
* *
*I have two questions on data subsample manipulation. I am starting to use R
again after a long brake and feel a bit rusty.*
* *
*I want to select a subsample of data for males and females separately*
* *
library(foreign)
Datatemp <- read.spss("H:/Skjol/Data/HL/t1a
2 matches
Mail list logo