I have below data frame with two input string (input1 & input2 column) and need help to convert the output string (as described in the output column). I am looking for solution using base R (preferably regular expression)
df <- data.frame(input1=c("0000.00", "0000.00", "0000.00"),
input2 = c("23.3", "23", "2323.23"),
output = c("0023.30", "0023.00", "2323.23"))
df$output <- paste0(df$input1,"",df$input2)you have split the data after this to get your answer.formatorformatC. There may be a better way if you try and approach it like that