0

I have to summarize the information of an AnnotatedDataFrame and a graphNEL together. My problem is that the same "feature" in the data frame and in the graphNEL has different names: in the data frame I have NAME and IDnumber separately (two columns), in the graphNEL I have a single column whose entries are in the form NAME(IDnumber). It is a very large dataset, so it is absolutely out of question to rename them manually. Is there a way to make the dataset entries in the form NAME(IDnumber)?

Thank you in advance.

Jaap
  • 81,064
  • 34
  • 182
  • 193
jeiroje
  • 85
  • 9
  • It's always wise to give a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) (also, you might want to read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask)). – Jaap Sep 17 '14 at 13:26

1 Answers1

1

Supposing your dataframe is called df, you can create a new variable with:

df$new <- paste0(df$NAME, "(", df$IDnumber, ")")
Jaap
  • 81,064
  • 34
  • 182
  • 193