“edit” and “read.table” on R for Mac

Hi! @tbradley added special formatting characters to format your code as code. We ask people to do that as much as possible around here because it is difficult to read code that isn’t formatted like code. Here’s more on how that works:

Unfortunately, you can’t use italics inside code blocks, since special characters are all interpreted literally and other formatting (colors, etc) are applied automatically via a JavaScript syntax highlighting engine. It’s common for people to write something like /Users/your_username_here/Documents/ when they mean to say that the path should be customized before using it. Even with the user name filled in, that path wouldn’t work for the poster without further editing if they’re storing their input file somewhere other than the Documents folder (or in a folder in a folder in the Documents folder...).

It sounds like your overall advice was to try using an absolute path rather than a relative path? If the file the OP is trying to read is in their working directory, then the relative path they used should work (and will be less fragile over time). But I agree that using an absolute path can at least get the import working, while you figure out how to organize your files and your project so that you don’t have to use absolute paths anymore.

2 Likes