[R] How do I get sub to insert a single backslash?

2006-01-05 Thread Michael Dewey
Something about the way R processes backslashes is defeating me. Perhaps this is because I have only just started using R for text processing. I would like to change occurrences of the ampersand into ampersand preceded by a backslash. temp - R D sub(, \, temp) [1] R D sub(, \\, temp)

Re: [R] How do I get sub to insert a single backslash?

2006-01-05 Thread Peter Dalgaard
Michael Dewey [EMAIL PROTECTED] writes: Something about the way R processes backslashes is defeating me. Perhaps this is because I have only just started using R for text processing. I would like to change occurrences of the ampersand into ampersand preceded by a backslash. temp - R