a = 5 b = 10
How can i get as output "10.5" or "10_5" ?
This must be general as values of a and b change at every iteration
thank you
a = 5 b = 10
How can i get as output "10.5" or "10_5" ?
This must be general as values of a and b change at every iteration
thank you
Perhaps
my_a_b <- data.frame(a = seq(1, 10, 2), b = seq(1, 30, 6))
str(my_a_b)
'data.frame':   5 obs. of  2 variables:
 $ a: num  1 3 5 7 9
 $ b: num  1 7 13 19 25
make a new column and populate it with your b & a, here separated with '.'
my_a_b['b_a'] <- as.character(paste(my_a_b$b,my_a_b$a, sep = '.')) 
> str(my_a_b)
'data.frame':   5 obs. of  3 variables:
 $ a  : num  1 3 5 7 9
 $ b  : num  1 7 13 19 25
 $ b_a: chr  "1.1" "7.3" "13.5" "19.7" ...
