> I am trying to create a function that is able to calculate this sum:
>
> a<-c(2,3,5)
> b<-(8,7)
>
> with "a" meaning 235 and "b" 87. So the result of this sum would be 235 + 87
> = 322.
a <- c(2,3,5)
b <- c(8,7)
vectorToScalar <- function(x) {
as.numeric(paste(x, collapse = ""))
}
vectorToScalar(a) + vectorToScalar(b)