Re: [R] Combining Differnt columns in one single column

2022-06-13 Thread Ebert,Timothy Aaron
t;,"name") ID6 <-as.data.frame(ID_names2) ID6$name<-colnames(ID6) colnames(ID6)<-c("val","name") IDall<-rbind(ID5,ID6) Tim -Original Message- From: anteneh asmare Sent: Monday, June 13, 2022 4:49 PM To: Ebert,Timothy Aaron Cc: r-help@r-projec

Re: [R] Combining Differnt columns in one single column

2022-06-13 Thread Ebert,Timothy Aaron
he same thing for the > others. > Tim > > -----Original Message- > From: R-help On Behalf Of anteneh > asmare > Sent: Monday, June 13, 2022 3:48 PM > To: r-help@r-project.org > Subject: [R] Combining Differnt columns in one single column > > [Externa

Re: [R] Combining Differnt columns in one single column

2022-06-13 Thread Rui Barradas
Hello, Are you looking for this? ID_names <- sprintf("id%05d", 1:5) head(ID_names) #> [1] "id1" "id2" "id3" "id4" "id5" "id6" tail(ID_names) #> [1] "id49995" "id49996" "id49997" "id49998" "id4" "id5" sprintf with the format %05d pads the integers with

Re: [R] Combining Differnt columns in one single column

2022-06-13 Thread anteneh asmare
ne 13, 2022 3:48 PM > To: r-help@r-project.org > Subject: [R] Combining Differnt columns in one single column > > [External Email] > > Dear All, I have the following column name in different data frame and > different size > ID_names1 <- paste0("id",1:9) >