R语言使用readr包读取文件的问题

img


如图想要正确读取该文件中的数据,格式如下图所示

img


于是我先是尝试了以下代码:

read_table(file = "data/Table2.txt",skip = 2,
           col_types =cols(Name = col_character(),
  Age = col_double(),
  Height = col_double(),
  Weight = col_double(),
  Sex = col_character()))

但是却无法调用quote参数把'/'省去

img


然后再次尝试read_delim()函数,quote问题解决了分隔符号又出现了问题:

read_delim(file = "data/Table2.txt",skip = 2,quote = '/',delim = ' ',
           col_types =cols(Name = col_character(),
  Age = col_double(),
  Height = col_double(),
  Weight = col_double(),
  Sex = col_character()))

img


求问该怎么才能读取出想要的数据格式