rreadxlwritexl

How to update a value at specific position in cell data


I have an excel sheet. Where I have data like this

Sample_d   sample_normal
1          (0.234,0.889) 

I want to remove the '()' brackets from the first and last positions in the 'sample_normal' column.


Solution

  • Import the data into R and then use :

    df <- readxl::read_excel('excel_file.xlsx')
    df$sample_normal <- gsub('^\\(|\\)$', '', df$sample_normal)