Hello R Forum users,
I was hoping someone could help me with the following problem. Consider the
following toy dataset:
AccessionSNP_CRY2SNP_FLCPhenotype
1NAA0.783143079
2BQA0.881714811
3BQA0.886619488
4AQB0.416893034
5AQB
Some variation of the following might be want you want:
df=data.frame(sex=sample(1:2,100,replace=T),snp.1=rnorm(100),snp.15=runif(100))
df$snp.1[df$snp.11.0]-NA; #put some missing values into the data
x=grep('^snp',names(df)); x #which columns that begin with 'snp'
apply(df[,x],2,summary)
#or
2 matches
Mail list logo