Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 208188

How to replace pattern in string with current row number

$
0
0

I am trying to replace all instances of "." in a data frame with current row number. I am new to R so help and a bit of an explanation would be appreciated

I tried this:

nodots <- str_replace(string_ensembl_genes, “.”, 
                      as.character(rownames(string_ensembl_genes)))

but it gave me a fatal error


Viewing all articles
Browse latest Browse all 208188

Trending Articles