0

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.

Qasim Ali
  • 66
  • 9

1 Answers1

1

Import the data into R and then use :

df <- readxl::read_excel('excel_file.xlsx')
df$sample_normal <- gsub('^\\(|\\)$', '', df$sample_normal)
Ronak Shah
  • 377,200
  • 20
  • 156
  • 213
  • Wow! it works. Thank you. Can you please recommend to me any book or website where can I learn the basics of R? especially working with excel sheets. – Qasim Ali Dec 04 '20 at 21:33
  • Advanced R is a good book for general R. https://adv-r.hadley.nz/ – Ronak Shah Dec 05 '20 at 00:35