R/create_profile_strings.R

"create_profile_strings" <-
function(x,y){

## Return the profile strings from x based on groups in y

groups<-levels(y)
z<-rep(0,dim(x)[2])
for(i in 1:length(groups)){
    temp<-create_profile(x[y==groups[i],])
    dim(temp)<-c(1,20*dim(temp)[2])
    row.names(temp)<-groups[i]
    z<-rbind(z,temp)    
}

result<-z[!(row.names(z)=="z"),]
colnames(result)<-colnames(x)
return(result)
}

Try the bgafun package in your browser

Any scripts or data that you put into this service are public.

bgafun documentation built on April 28, 2020, 7:56 p.m.