字符串中空格去除函数:str_trim 函数str_trim可以去除字符串中的空格,通过参数side设置去除字符串开头、结尾、结尾和开头中的空格,但不能去除字符串中间的空格。 fruit=c(" apple","pear ","ban ana")str_trim(fruit)##[1]"apple""pear""ban ana"str_trim(fruit,side="left")##[1]"apple""pear ""b...