Entering edit mode
17 months ago
Mohamed Samir
▴
30
Dear , I would like to create a new column in a data frame in R, where I want to have string (e.g. SNP) in a descending orders (e.g. SNPs1, SNPs2, SNPs3, etc.). Could any of you let me know how ?
It is difficult to see what you need without an example, you may have a look at the
arrange()
function : https://dplyr.tidyverse.org/reference/arrange.htmlThanks. Actually, this link is not what I am looking for. I want to create a new column, and I want to have value in this column that are n a descending orders (e.g. SNPs1, SNPs2, SNPs3, etc.). Example: my data frame is DF, and I want it to have a new column (here is columnX), and it should contain the characters SNP1, SNP2, SNP3, etc. like this table :
Ok, please next time directly add a reproducible example in your post to make your question clear to others