r - Map columns of a data frame using a string -



r - Map columns of a data frame using a string -

i have 2x5 info frame row names , column names specified below:

test <- matrix(na,nrow=2,ncol=5) test[1,] = c(2,3,6,8,9) test[2,] = c(5,3,2,7,8) colnames(test) = c('aa','bb','cc','dd','ee') rownames(test) = c('first','second') test = data.frame(test)

i map columns of info frame format specified vector:

test2 = c('ee','cc','dd','bb','aa')

does know how can that?

r

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -